@merkaly/api 0.2.5-8 → 0.3.0

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 (175) hide show
  1. package/dist/account/address/address.entity.d.ts +7 -0
  2. package/dist/account/address/address.validator.d.ts +17 -0
  3. package/dist/account/address/index.d.ts +2 -0
  4. package/dist/account/address/index.js +2 -0
  5. package/dist/account/user/index.d.ts +2 -0
  6. package/dist/account/user/index.js +2 -0
  7. package/dist/account/user/user.entity.d.ts +8 -0
  8. package/dist/account/user/user.validator.d.ts +17 -0
  9. package/dist/billing/payment/index.d.ts +2 -0
  10. package/dist/billing/payment/index.js +5 -0
  11. package/dist/billing/payment/payment.enum.d.ts +15 -0
  12. package/dist/billing/payment/payment.enum.js +21 -0
  13. package/dist/billing/payment/transaction.entity.d.ts +15 -0
  14. package/dist/billing/status/index.d.ts +1 -0
  15. package/dist/billing/status/index.js +2 -0
  16. package/dist/billing/status/status.entity.d.ts +8 -0
  17. package/dist/inventory/catalog/attribute/attribute.entity.d.ts +8 -0
  18. package/dist/inventory/catalog/attribute/attribute.validator.d.ts +15 -0
  19. package/dist/inventory/catalog/attribute/index.d.ts +2 -0
  20. package/dist/inventory/catalog/attribute/index.js +2 -0
  21. package/dist/inventory/catalog/brand/brand.entity.d.ts +7 -0
  22. package/dist/inventory/catalog/brand/brand.validator.d.ts +12 -0
  23. package/dist/inventory/catalog/brand/index.d.ts +2 -0
  24. package/dist/inventory/catalog/brand/index.js +2 -0
  25. package/dist/inventory/catalog/category/category.entity.d.ts +7 -0
  26. package/dist/inventory/catalog/category/category.validator.d.ts +12 -0
  27. package/dist/inventory/catalog/category/index.d.ts +2 -0
  28. package/dist/inventory/catalog/category/index.js +2 -0
  29. package/dist/inventory/catalog/collection/collection.entity.d.ts +7 -0
  30. package/dist/inventory/catalog/collection/collection.validator.d.ts +13 -0
  31. package/dist/inventory/catalog/collection/index.d.ts +2 -0
  32. package/dist/inventory/catalog/collection/index.js +2 -0
  33. package/dist/inventory/catalog/product/index.d.ts +3 -0
  34. package/dist/inventory/catalog/product/index.js +4 -0
  35. package/dist/inventory/catalog/product/product.entity.d.ts +31 -0
  36. package/dist/inventory/catalog/product/product.status.enum.d.ts +8 -0
  37. package/dist/inventory/catalog/product/product.status.enum.js +13 -0
  38. package/dist/inventory/catalog/product/product.validator.d.ts +39 -0
  39. package/dist/inventory/configuration/label/index.d.ts +2 -0
  40. package/dist/inventory/configuration/label/index.js +2 -0
  41. package/dist/inventory/configuration/label/label.entity.d.ts +7 -0
  42. package/dist/inventory/configuration/label/label.validator.d.ts +14 -0
  43. package/dist/inventory/configuration/measurement/index.d.ts +1 -0
  44. package/dist/inventory/configuration/measurement/index.js +2 -0
  45. package/dist/inventory/configuration/measurement/measurement.entity.d.ts +8 -0
  46. package/dist/inventory/configuration/unit/index.d.ts +1 -0
  47. package/dist/inventory/configuration/unit/index.js +2 -0
  48. package/dist/inventory/configuration/unit/unit.entity.d.ts +8 -0
  49. package/dist/inventory/stock/backorder/backorder.entity.d.ts +33 -0
  50. package/dist/inventory/stock/backorder/backorder.validator.d.ts +24 -0
  51. package/dist/inventory/stock/backorder/index.d.ts +2 -0
  52. package/dist/inventory/stock/backorder/index.js +2 -0
  53. package/dist/inventory/stock/transfer/index.d.ts +2 -0
  54. package/dist/inventory/stock/transfer/index.js +2 -0
  55. package/dist/inventory/stock/transfer/transfer.entity.d.ts +28 -0
  56. package/dist/inventory/stock/transfer/transfer.validator.d.ts +25 -0
  57. package/dist/inventory/stock/warehouse/index.d.ts +2 -0
  58. package/dist/inventory/stock/warehouse/index.js +2 -0
  59. package/dist/inventory/stock/warehouse/warehouse.entity.d.ts +21 -0
  60. package/dist/inventory/stock/warehouse/warehouse.validator.d.ts +27 -0
  61. package/dist/logistic/carrier/carrier.entity.d.ts +10 -0
  62. package/dist/logistic/carrier/carrier.validator.d.ts +17 -0
  63. package/dist/logistic/carrier/index.d.ts +2 -0
  64. package/dist/logistic/carrier/index.js +2 -0
  65. package/dist/logistic/shipment/index.d.ts +3 -0
  66. package/dist/logistic/shipment/index.js +5 -0
  67. package/dist/logistic/shipment/shipment.entity.d.ts +19 -0
  68. package/dist/logistic/shipment/shipment.enum.d.ts +16 -0
  69. package/dist/logistic/shipment/shipment.enum.js +22 -0
  70. package/dist/logistic/shipment/shipment.validator.d.ts +18 -0
  71. package/dist/order/purchase/item/index.d.ts +2 -0
  72. package/dist/order/purchase/item/index.js +2 -0
  73. package/dist/order/purchase/item/item.entity.d.ts +11 -0
  74. package/dist/order/purchase/item/item.validator.d.ts +7 -0
  75. package/dist/order/purchase/transaction/index.d.ts +3 -0
  76. package/dist/order/purchase/transaction/index.js +4 -0
  77. package/dist/order/purchase/transaction/transaction.entity.d.ts +17 -0
  78. package/dist/order/purchase/transaction/transaction.enum.d.ts +8 -0
  79. package/dist/order/purchase/transaction/transaction.enum.js +13 -0
  80. package/dist/order/purchase/transaction/transaction.validator.d.ts +21 -0
  81. package/dist/order/purchase/vendor/index.d.ts +2 -0
  82. package/dist/order/purchase/vendor/index.js +2 -0
  83. package/dist/order/purchase/vendor/vendor.entity.d.ts +11 -0
  84. package/dist/order/purchase/vendor/vendor.validator.d.ts +18 -0
  85. package/dist/order/sale/customer/customer.entity.d.ts +11 -0
  86. package/dist/order/sale/customer/customer.validator.d.ts +18 -0
  87. package/dist/order/sale/customer/index.d.ts +2 -0
  88. package/dist/order/sale/customer/index.js +2 -0
  89. package/dist/order/sale/item/index.d.ts +2 -0
  90. package/dist/order/sale/item/index.js +2 -0
  91. package/dist/order/sale/item/item.entity.d.ts +10 -0
  92. package/dist/order/sale/item/item.validator.d.ts +5 -0
  93. package/dist/order/sale/transaction/index.d.ts +3 -0
  94. package/dist/order/sale/transaction/index.js +4 -0
  95. package/dist/order/sale/transaction/transaction.entity.d.ts +21 -0
  96. package/dist/order/sale/transaction/transaction.enum.d.ts +8 -0
  97. package/dist/order/sale/transaction/transaction.enum.js +13 -0
  98. package/dist/order/sale/transaction/transaction.validator.d.ts +21 -0
  99. package/package.json +102 -86
  100. package/.output/abstracts/abstract.entity.d.ts +0 -14
  101. package/.output/abstracts/abstract.validator.d.ts +0 -24
  102. package/.output/abstracts/abstract.validator.js +0 -118
  103. package/.output/exceptions/missing-identity.exception.d.ts +0 -5
  104. package/.output/exceptions/missing-identity.exception.js +0 -30
  105. package/.output/modules/asset/files/file.entity.d.ts +0 -9
  106. package/.output/modules/asset/files/file.schema.d.ts +0 -34
  107. package/.output/modules/asset/files/file.schema.js +0 -10
  108. package/.output/modules/auth/organizations/organization.entity.d.ts +0 -8
  109. package/.output/modules/auth/users/user.entity.d.ts +0 -9
  110. package/.output/modules/auth/users/user.schema.d.ts +0 -34
  111. package/.output/modules/auth/users/user.schema.js +0 -10
  112. package/.output/modules/auth/users/user.validator.d.ts +0 -12
  113. package/.output/modules/auth/users/user.validator.js +0 -58
  114. package/.output/modules/inventory/brands/brand.entity.d.ts +0 -6
  115. package/.output/modules/inventory/brands/brand.schema.d.ts +0 -34
  116. package/.output/modules/inventory/brands/brand.schema.js +0 -10
  117. package/.output/modules/inventory/brands/brand.validator.d.ts +0 -11
  118. package/.output/modules/inventory/brands/brand.validator.js +0 -74
  119. package/.output/modules/inventory/categories/category.entity.d.ts +0 -6
  120. package/.output/modules/inventory/categories/category.schema.d.ts +0 -34
  121. package/.output/modules/inventory/categories/category.schema.js +0 -10
  122. package/.output/modules/inventory/categories/category.validator.d.ts +0 -8
  123. package/.output/modules/inventory/categories/category.validator.js +0 -42
  124. package/.output/modules/inventory/products/documents/attribute.document.d.ts +0 -5
  125. package/.output/modules/inventory/products/documents/attribute.document.js +0 -33
  126. package/.output/modules/inventory/products/documents/dimension.document.d.ts +0 -6
  127. package/.output/modules/inventory/products/documents/dimension.document.js +0 -35
  128. package/.output/modules/inventory/products/product.entity.d.ts +0 -19
  129. package/.output/modules/inventory/products/product.schema.d.ts +0 -34
  130. package/.output/modules/inventory/products/product.schema.js +0 -18
  131. package/.output/modules/inventory/products/product.validator.d.ts +0 -29
  132. package/.output/modules/inventory/products/product.validator.js +0 -181
  133. package/.output/modules/inventory/products/validators/attributes.validator.d.ts +0 -5
  134. package/.output/modules/inventory/products/validators/attributes.validator.js +0 -35
  135. package/.output/modules/inventory/products/validators/dimension.validator.d.ts +0 -6
  136. package/.output/modules/inventory/products/validators/dimension.validator.js +0 -38
  137. package/.output/modules/sale/customers/customer.entity.d.ts +0 -8
  138. package/.output/modules/sale/customers/customer.schema.d.ts +0 -34
  139. package/.output/modules/sale/customers/customer.schema.js +0 -10
  140. package/.output/modules/sale/customers/customer.validator.d.ts +0 -14
  141. package/.output/modules/sale/customers/customer.validator.js +0 -94
  142. package/.output/modules/sale/orders/documents/address.document.d.ts +0 -8
  143. package/.output/modules/sale/orders/documents/address.document.js +0 -43
  144. package/.output/modules/sale/orders/documents/status.document.d.ts +0 -8
  145. package/.output/modules/sale/orders/documents/status.document.js +0 -34
  146. package/.output/modules/sale/orders/entities/item.entity.d.ts +0 -38
  147. package/.output/modules/sale/orders/enums/order.status.d.ts +0 -6
  148. package/.output/modules/sale/orders/enums/order.status.js +0 -10
  149. package/.output/modules/sale/orders/order.entity.d.ts +0 -21
  150. package/.output/modules/sale/orders/order.validator.d.ts +0 -16
  151. package/.output/modules/sale/orders/order.validator.js +0 -86
  152. package/.output/modules/sale/orders/validators/address.validator.d.ts +0 -17
  153. package/.output/modules/sale/orders/validators/address.validator.js +0 -81
  154. package/.output/modules/sale/orders/validators/billing.validator.d.ts +0 -8
  155. package/.output/modules/sale/orders/validators/billing.validator.js +0 -13
  156. package/.output/modules/sale/orders/validators/item.validator.d.ts +0 -5
  157. package/.output/modules/sale/orders/validators/item.validator.js +0 -32
  158. package/.output/modules/sale/orders/validators/payment.validator.d.ts +0 -10
  159. package/.output/modules/sale/orders/validators/payment.validator.js +0 -62
  160. package/.output/modules/sale/orders/validators/shipping.validator.d.ts +0 -9
  161. package/.output/modules/sale/orders/validators/shipping.validator.js +0 -14
  162. package/.output/modules/sale/payments/entities/status.entity.d.ts +0 -8
  163. package/.output/modules/sale/payments/enums/billing.type.d.ts +0 -6
  164. package/.output/modules/sale/payments/enums/billing.type.js +0 -10
  165. package/.output/modules/sale/payments/enums/payment.status.d.ts +0 -7
  166. package/.output/modules/sale/payments/enums/payment.status.js +0 -11
  167. package/.output/modules/sale/payments/enums/shipping.type.d.ts +0 -4
  168. package/.output/modules/sale/payments/enums/shipping.type.js +0 -8
  169. package/.output/modules/sale/payments/payment.entity.d.ts +0 -12
  170. package/.output/modules/sale/payments/payment.schema.d.ts +0 -34
  171. package/.output/modules/sale/payments/payment.schema.js +0 -14
  172. package/.output/modules/sale/payments/payment.validator.d.ts +0 -16
  173. package/.output/modules/sale/payments/payment.validator.js +0 -77
  174. package/.output/tsconfig.package.tsbuildinfo +0 -1
  175. package/README.md +0 -79
@@ -1,32 +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.CreateItemValidator = void 0;
13
- var class_validator_1 = require("class-validator");
14
- var CreateItemValidator = exports.CreateItemValidator = (function () {
15
- function CreateItemValidator() {
16
- }
17
- __decorate([
18
- (0, class_validator_1.IsMongoId)(),
19
- __metadata("design:type", String)
20
- ], CreateItemValidator.prototype, "product", void 0);
21
- __decorate([
22
- (0, class_validator_1.IsPositive)(),
23
- (0, class_validator_1.IsInt)(),
24
- __metadata("design:type", Number)
25
- ], CreateItemValidator.prototype, "quantity", void 0);
26
- __decorate([
27
- (0, class_validator_1.IsString)(),
28
- (0, class_validator_1.IsOptional)(),
29
- __metadata("design:type", String)
30
- ], CreateItemValidator.prototype, "description", void 0);
31
- return CreateItemValidator;
32
- }());
@@ -1,10 +0,0 @@
1
- export declare class PaymentCardValidator {
2
- number: string;
3
- name: string;
4
- expMonth: number;
5
- expYear: number;
6
- cvv: string;
7
- }
8
- export declare class PaymentValidator {
9
- card: PaymentCardValidator;
10
- }
@@ -1,62 +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.PaymentValidator = exports.PaymentCardValidator = void 0;
13
- var class_transformer_1 = require("class-transformer");
14
- var class_validator_1 = require("class-validator");
15
- var PaymentCardValidator = exports.PaymentCardValidator = (function () {
16
- function PaymentCardValidator() {
17
- this.number = String();
18
- this.name = String();
19
- this.cvv = String();
20
- }
21
- __decorate([
22
- (0, class_validator_1.IsString)(),
23
- (0, class_validator_1.IsNotEmpty)(),
24
- __metadata("design:type", Object)
25
- ], PaymentCardValidator.prototype, "number", void 0);
26
- __decorate([
27
- (0, class_validator_1.IsString)(),
28
- (0, class_validator_1.IsNotEmpty)(),
29
- __metadata("design:type", Object)
30
- ], PaymentCardValidator.prototype, "name", void 0);
31
- __decorate([
32
- (0, class_validator_1.IsPositive)(),
33
- (0, class_validator_1.Min)(1),
34
- (0, class_validator_1.Max)(12),
35
- __metadata("design:type", Number)
36
- ], PaymentCardValidator.prototype, "expMonth", void 0);
37
- __decorate([
38
- (0, class_validator_1.IsPositive)(),
39
- (0, class_validator_1.Min)(new Date().getFullYear()),
40
- (0, class_validator_1.IsNotEmpty)(),
41
- __metadata("design:type", Number)
42
- ], PaymentCardValidator.prototype, "expYear", void 0);
43
- __decorate([
44
- (0, class_validator_1.IsNumberString)(),
45
- (0, class_validator_1.Length)(3, 4),
46
- (0, class_validator_1.IsNotEmpty)(),
47
- __metadata("design:type", Object)
48
- ], PaymentCardValidator.prototype, "cvv", void 0);
49
- return PaymentCardValidator;
50
- }());
51
- var PaymentValidator = exports.PaymentValidator = (function () {
52
- function PaymentValidator() {
53
- this.card = new PaymentCardValidator();
54
- }
55
- __decorate([
56
- (0, class_validator_1.ValidateNested)(),
57
- (0, class_transformer_1.Type)(function () { return PaymentCardValidator; }),
58
- (0, class_validator_1.IsOptional)(),
59
- __metadata("design:type", Object)
60
- ], PaymentValidator.prototype, "card", void 0);
61
- return PaymentValidator;
62
- }());
@@ -1,9 +0,0 @@
1
- import { ShippingType } from '../../payments/enums/shipping.type';
2
- import { AddressValidator } from './address.validator';
3
- export declare class ShippingValidator {
4
- address: AddressValidator;
5
- type: ShippingType;
6
- name: string;
7
- phone: string;
8
- email: string;
9
- }
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ShippingValidator = void 0;
4
- var address_validator_1 = require("./address.validator");
5
- var ShippingValidator = (function () {
6
- function ShippingValidator() {
7
- this.address = new address_validator_1.AddressValidator();
8
- this.name = String();
9
- this.phone = String();
10
- this.email = String();
11
- }
12
- return ShippingValidator;
13
- }());
14
- exports.ShippingValidator = ShippingValidator;
@@ -1,8 +0,0 @@
1
- import type { MaybeEntity } from '../../../../abstracts/abstract.entity';
2
- import { UserEntity } from '../../../auth/users/user.entity';
3
- import { PaymentStatus } from '../enums/payment.status';
4
- export declare class StatusEntity {
5
- name: PaymentStatus;
6
- user: MaybeEntity<UserEntity>;
7
- date: Date;
8
- }
@@ -1,6 +0,0 @@
1
- export declare enum BillingType {
2
- PIX = "PIX",
3
- BOLETO = "BOLETO",
4
- CARD = "CARD",
5
- TRANSFER = "TRANSFER"
6
- }
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BillingType = void 0;
4
- var BillingType;
5
- (function (BillingType) {
6
- BillingType["PIX"] = "PIX";
7
- BillingType["BOLETO"] = "BOLETO";
8
- BillingType["CARD"] = "CARD";
9
- BillingType["TRANSFER"] = "TRANSFER";
10
- })(BillingType || (exports.BillingType = BillingType = {}));
@@ -1,7 +0,0 @@
1
- export declare enum PaymentStatus {
2
- UNPAID = "UNPAID",
3
- WAITING = "WAITING",
4
- PAID = "PAID",
5
- REFUNDED = "REFUNDED",
6
- CANCELLED = "CANCELLED"
7
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PaymentStatus = void 0;
4
- var PaymentStatus;
5
- (function (PaymentStatus) {
6
- PaymentStatus["UNPAID"] = "UNPAID";
7
- PaymentStatus["WAITING"] = "WAITING";
8
- PaymentStatus["PAID"] = "PAID";
9
- PaymentStatus["REFUNDED"] = "REFUNDED";
10
- PaymentStatus["CANCELLED"] = "CANCELLED";
11
- })(PaymentStatus || (exports.PaymentStatus = PaymentStatus = {}));
@@ -1,4 +0,0 @@
1
- export declare enum ShippingType {
2
- RETIRE = "RETIRE",
3
- DELIVERY = "DELIVERY"
4
- }
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ShippingType = void 0;
4
- var ShippingType;
5
- (function (ShippingType) {
6
- ShippingType["RETIRE"] = "RETIRE";
7
- ShippingType["DELIVERY"] = "DELIVERY";
8
- })(ShippingType || (exports.ShippingType = ShippingType = {}));
@@ -1,12 +0,0 @@
1
- import { AbstractEntity } from '../../../abstracts/abstract.entity';
2
- import { OrderEntity } from '../orders/order.entity';
3
- import { StatusEntity } from './entities/status.entity';
4
- import { BillingType } from './enums/billing.type';
5
- export declare class PaymentEntity extends AbstractEntity {
6
- status: StatusEntity[];
7
- total: number;
8
- fee: number;
9
- type: BillingType;
10
- readonly order: OrderEntity;
11
- readonly lastStatus: StatusEntity;
12
- }
@@ -1,34 +0,0 @@
1
- /// <reference types="mongoose/types/aggregate" />
2
- /// <reference types="mongoose/types/callback" />
3
- /// <reference types="mongoose/types/collection" />
4
- /// <reference types="mongoose/types/connection" />
5
- /// <reference types="mongoose/types/cursor" />
6
- /// <reference types="mongoose/types/document" />
7
- /// <reference types="mongoose/types/error" />
8
- /// <reference types="mongoose/types/expressions" />
9
- /// <reference types="mongoose/types/helpers" />
10
- /// <reference types="mongoose/types/middlewares" />
11
- /// <reference types="mongoose/types/indexes" />
12
- /// <reference types="mongoose/types/models" />
13
- /// <reference types="mongoose/types/mongooseoptions" />
14
- /// <reference types="mongoose/types/pipelinestage" />
15
- /// <reference types="mongoose/types/populate" />
16
- /// <reference types="mongoose/types/query" />
17
- /// <reference types="mongoose/types/schemaoptions" />
18
- /// <reference types="mongoose/types/schematypes" />
19
- /// <reference types="mongoose/types/session" />
20
- /// <reference types="mongoose/types/types" />
21
- /// <reference types="mongoose/types/utility" />
22
- /// <reference types="mongoose/types/validation" />
23
- /// <reference types="mongoose/types/virtuals" />
24
- /// <reference types="mongoose" />
25
- /// <reference types="mongoose/types/inferschematype" />
26
- import { PaymentEntity } from './payment.entity';
27
- export declare namespace PaymentSchema {
28
- const name = "sales_payments";
29
- const schema: import("mongoose").Schema<PaymentEntity, import("mongoose").Model<PaymentEntity, any, any, any, import("mongoose").Document<unknown, any, PaymentEntity> & PaymentEntity & Required<{
30
- _id: string;
31
- }>, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, PaymentEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<PaymentEntity>> & import("mongoose").FlatRecord<PaymentEntity> & Required<{
32
- _id: string;
33
- }>>;
34
- }
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PaymentSchema = void 0;
4
- var mongoose_1 = require("@nestjs/mongoose");
5
- var payment_entity_1 = require("./payment.entity");
6
- var PaymentSchema;
7
- (function (PaymentSchema) {
8
- PaymentSchema.name = 'sales_payments';
9
- PaymentSchema.schema = mongoose_1.SchemaFactory.createForClass(payment_entity_1.PaymentEntity);
10
- PaymentSchema.schema.virtual('lastStatus').get(function () {
11
- var first = this.status.reverse()[0];
12
- return first;
13
- });
14
- })(PaymentSchema || (exports.PaymentSchema = PaymentSchema = {}));
@@ -1,16 +0,0 @@
1
- import { IdMongoValidator } from '../../../abstracts/abstract.validator';
2
- import { PaymentValidator } from '../orders/validators/payment.validator';
3
- import { BillingType } from './enums/billing.type';
4
- import { PaymentStatus } from './enums/payment.status';
5
- export declare class CreatePaymentValidator {
6
- type: BillingType;
7
- total: number;
8
- order: string;
9
- user: string;
10
- payload: PaymentValidator;
11
- }
12
- export declare class UpdatePaymentValidator {
13
- }
14
- export declare class UpdatePaymentStatusValidator extends IdMongoValidator {
15
- type: PaymentStatus;
16
- }
@@ -1,77 +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.UpdatePaymentStatusValidator = exports.UpdatePaymentValidator = exports.CreatePaymentValidator = void 0;
28
- var class_transformer_1 = require("class-transformer");
29
- var class_validator_1 = require("class-validator");
30
- var abstract_validator_1 = require("../../../abstracts/abstract.validator");
31
- var payment_validator_1 = require("../orders/validators/payment.validator");
32
- var billing_type_1 = require("./enums/billing.type");
33
- var payment_status_1 = require("./enums/payment.status");
34
- var CreatePaymentValidator = exports.CreatePaymentValidator = (function () {
35
- function CreatePaymentValidator() {
36
- }
37
- __decorate([
38
- (0, class_validator_1.IsEnum)(billing_type_1.BillingType),
39
- __metadata("design:type", String)
40
- ], CreatePaymentValidator.prototype, "type", void 0);
41
- __decorate([
42
- (0, class_validator_1.IsPositive)(),
43
- __metadata("design:type", Number)
44
- ], CreatePaymentValidator.prototype, "total", void 0);
45
- __decorate([
46
- (0, class_validator_1.IsMongoId)(),
47
- __metadata("design:type", String)
48
- ], CreatePaymentValidator.prototype, "order", void 0);
49
- __decorate([
50
- (0, class_validator_1.IsMongoId)(),
51
- __metadata("design:type", String)
52
- ], CreatePaymentValidator.prototype, "user", void 0);
53
- __decorate([
54
- (0, class_validator_1.ValidateNested)(),
55
- (0, class_transformer_1.Type)(function () { return payment_validator_1.PaymentValidator; }),
56
- (0, class_validator_1.IsNotEmptyObject)(),
57
- __metadata("design:type", payment_validator_1.PaymentValidator)
58
- ], CreatePaymentValidator.prototype, "payload", void 0);
59
- return CreatePaymentValidator;
60
- }());
61
- var UpdatePaymentValidator = (function () {
62
- function UpdatePaymentValidator() {
63
- }
64
- return UpdatePaymentValidator;
65
- }());
66
- exports.UpdatePaymentValidator = UpdatePaymentValidator;
67
- var UpdatePaymentStatusValidator = exports.UpdatePaymentStatusValidator = (function (_super) {
68
- __extends(UpdatePaymentStatusValidator, _super);
69
- function UpdatePaymentStatusValidator() {
70
- return _super !== null && _super.apply(this, arguments) || this;
71
- }
72
- __decorate([
73
- (0, class_validator_1.IsEnum)(payment_status_1.PaymentStatus),
74
- __metadata("design:type", String)
75
- ], UpdatePaymentStatusValidator.prototype, "type", void 0);
76
- return UpdatePaymentStatusValidator;
77
- }(abstract_validator_1.IdMongoValidator));