@merkaly/api 0.2.5-8 → 0.3.2

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 (261) hide show
  1. package/dist/abstract.entity.d.ts +10 -0
  2. package/dist/abstract.entity.js +45 -0
  3. package/dist/abstract.repository.d.ts +56 -0
  4. package/dist/abstract.repository.js +200 -0
  5. package/dist/abstract.validator.d.ts +22 -0
  6. package/dist/abstract.validator.js +98 -0
  7. package/dist/account/address/address.entity.d.ts +7 -0
  8. package/dist/account/address/address.entity.js +34 -0
  9. package/dist/account/address/address.validator.d.ts +17 -0
  10. package/dist/account/address/address.validator.js +67 -0
  11. package/dist/account/address/index.d.ts +2 -0
  12. package/dist/account/address/index.js +12 -0
  13. package/dist/account/cart/cart.entity.d.ts +8 -0
  14. package/dist/account/cart/cart.entity.js +34 -0
  15. package/dist/account/cart/cart.validator.d.ts +13 -0
  16. package/dist/account/cart/cart.validator.js +45 -0
  17. package/dist/account/cart/index.d.ts +2 -0
  18. package/dist/account/cart/index.js +12 -0
  19. package/dist/account/payment/index.d.ts +2 -0
  20. package/dist/account/payment/index.js +12 -0
  21. package/dist/account/payment/payment.entity.d.ts +11 -0
  22. package/dist/account/payment/payment.entity.js +57 -0
  23. package/dist/account/payment/payment.validator.d.ts +15 -0
  24. package/dist/account/payment/payment.validator.js +57 -0
  25. package/dist/account/user/index.d.ts +2 -0
  26. package/dist/account/user/index.js +12 -0
  27. package/dist/account/user/user.entity.d.ts +8 -0
  28. package/dist/account/user/user.entity.js +46 -0
  29. package/dist/account/user/user.validator.d.ts +17 -0
  30. package/dist/account/user/user.validator.js +68 -0
  31. package/dist/account/wishlist/index.d.ts +2 -0
  32. package/dist/account/wishlist/index.js +12 -0
  33. package/dist/account/wishlist/wishlist.entity.d.ts +8 -0
  34. package/dist/account/wishlist/wishlist.entity.js +38 -0
  35. package/dist/account/wishlist/wishlist.validator.d.ts +12 -0
  36. package/dist/account/wishlist/wishlist.validator.js +39 -0
  37. package/dist/address.entity.d.ts +14 -0
  38. package/dist/address.entity.js +59 -0
  39. package/dist/assets/asset/asset.entity.d.ts +11 -0
  40. package/dist/assets/asset/asset.entity.js +58 -0
  41. package/dist/assets/asset/asset.enum.d.ts +6 -0
  42. package/dist/assets/asset/asset.enum.js +11 -0
  43. package/dist/assets/asset/index.d.ts +2 -0
  44. package/dist/assets/asset/index.js +12 -0
  45. package/dist/billing/payment/index.d.ts +2 -0
  46. package/dist/billing/payment/index.js +12 -0
  47. package/dist/billing/payment/payment.enum.d.ts +15 -0
  48. package/dist/billing/payment/payment.enum.js +21 -0
  49. package/dist/billing/payment/transaction.entity.d.ts +15 -0
  50. package/dist/billing/payment/transaction.entity.js +55 -0
  51. package/dist/billing/status/index.d.ts +1 -0
  52. package/dist/billing/status/index.js +7 -0
  53. package/dist/billing/status/status.entity.d.ts +8 -0
  54. package/dist/billing/status/status.entity.js +40 -0
  55. package/dist/index.d.ts +5 -0
  56. package/dist/index.js +22 -0
  57. package/dist/inventory/catalog/attribute/attribute.entity.d.ts +8 -0
  58. package/dist/inventory/catalog/attribute/attribute.entity.js +47 -0
  59. package/dist/inventory/catalog/attribute/attribute.validator.d.ts +15 -0
  60. package/dist/inventory/catalog/attribute/attribute.validator.js +58 -0
  61. package/dist/inventory/catalog/attribute/index.d.ts +2 -0
  62. package/dist/inventory/catalog/attribute/index.js +12 -0
  63. package/dist/inventory/catalog/brand/brand.entity.d.ts +7 -0
  64. package/dist/inventory/catalog/brand/brand.entity.js +33 -0
  65. package/dist/inventory/catalog/brand/brand.validator.d.ts +12 -0
  66. package/dist/inventory/catalog/brand/brand.validator.js +39 -0
  67. package/dist/inventory/catalog/brand/index.d.ts +2 -0
  68. package/dist/inventory/catalog/brand/index.js +12 -0
  69. package/dist/inventory/catalog/category/category.entity.d.ts +7 -0
  70. package/dist/inventory/catalog/category/category.entity.js +33 -0
  71. package/dist/inventory/catalog/category/category.validator.d.ts +12 -0
  72. package/dist/inventory/catalog/category/category.validator.js +39 -0
  73. package/dist/inventory/catalog/category/index.d.ts +2 -0
  74. package/dist/inventory/catalog/category/index.js +12 -0
  75. package/dist/inventory/catalog/collection/collection.entity.d.ts +7 -0
  76. package/dist/inventory/catalog/collection/collection.entity.js +42 -0
  77. package/dist/inventory/catalog/collection/collection.validator.d.ts +13 -0
  78. package/dist/inventory/catalog/collection/collection.validator.js +45 -0
  79. package/dist/inventory/catalog/collection/index.d.ts +2 -0
  80. package/dist/inventory/catalog/collection/index.js +12 -0
  81. package/dist/inventory/catalog/product/index.d.ts +3 -0
  82. package/dist/inventory/catalog/product/index.js +17 -0
  83. package/dist/inventory/catalog/product/product.entity.d.ts +31 -0
  84. package/dist/inventory/catalog/product/product.entity.js +115 -0
  85. package/dist/inventory/catalog/product/product.status.enum.d.ts +8 -0
  86. package/dist/inventory/catalog/product/product.status.enum.js +13 -0
  87. package/dist/inventory/catalog/product/product.validator.d.ts +39 -0
  88. package/dist/inventory/catalog/product/product.validator.js +135 -0
  89. package/dist/inventory/configuration/label/index.d.ts +2 -0
  90. package/dist/inventory/configuration/label/index.js +12 -0
  91. package/dist/inventory/configuration/label/label.entity.d.ts +7 -0
  92. package/dist/inventory/configuration/label/label.entity.js +42 -0
  93. package/dist/inventory/configuration/label/label.validator.d.ts +14 -0
  94. package/dist/inventory/configuration/label/label.validator.js +51 -0
  95. package/dist/inventory/configuration/measurement/index.d.ts +2 -0
  96. package/dist/inventory/configuration/measurement/index.js +12 -0
  97. package/dist/inventory/configuration/measurement/measurement.entity.d.ts +8 -0
  98. package/dist/inventory/configuration/measurement/measurement.entity.js +42 -0
  99. package/dist/inventory/configuration/measurement/measurement.validator.d.ts +21 -0
  100. package/dist/inventory/configuration/measurement/measurement.validator.js +87 -0
  101. package/dist/inventory/configuration/unit/index.d.ts +1 -0
  102. package/dist/inventory/configuration/unit/index.js +7 -0
  103. package/dist/inventory/configuration/unit/unit.entity.d.ts +8 -0
  104. package/dist/inventory/configuration/unit/unit.entity.js +46 -0
  105. package/dist/inventory/stock/backorder/backorder.entity.d.ts +33 -0
  106. package/dist/inventory/stock/backorder/backorder.entity.js +106 -0
  107. package/dist/inventory/stock/backorder/backorder.validator.d.ts +24 -0
  108. package/dist/inventory/stock/backorder/backorder.validator.js +112 -0
  109. package/dist/inventory/stock/backorder/index.d.ts +2 -0
  110. package/dist/inventory/stock/backorder/index.js +12 -0
  111. package/dist/inventory/stock/transfer/index.d.ts +2 -0
  112. package/dist/inventory/stock/transfer/index.js +12 -0
  113. package/dist/inventory/stock/transfer/transfer.entity.d.ts +28 -0
  114. package/dist/inventory/stock/transfer/transfer.entity.js +108 -0
  115. package/dist/inventory/stock/transfer/transfer.validator.d.ts +25 -0
  116. package/dist/inventory/stock/transfer/transfer.validator.js +108 -0
  117. package/dist/inventory/stock/warehouse/index.d.ts +2 -0
  118. package/dist/inventory/stock/warehouse/index.js +12 -0
  119. package/dist/inventory/stock/warehouse/warehouse.entity.d.ts +21 -0
  120. package/dist/inventory/stock/warehouse/warehouse.entity.js +67 -0
  121. package/dist/inventory/stock/warehouse/warehouse.validator.d.ts +27 -0
  122. package/dist/inventory/stock/warehouse/warehouse.validator.js +115 -0
  123. package/dist/logistic/carrier/carrier.entity.d.ts +10 -0
  124. package/dist/logistic/carrier/carrier.entity.js +57 -0
  125. package/dist/logistic/carrier/carrier.validator.d.ts +17 -0
  126. package/dist/logistic/carrier/carrier.validator.js +69 -0
  127. package/dist/logistic/carrier/index.d.ts +2 -0
  128. package/dist/logistic/carrier/index.js +12 -0
  129. package/dist/logistic/shipment/index.d.ts +3 -0
  130. package/dist/logistic/shipment/index.js +17 -0
  131. package/dist/logistic/shipment/shipment.entity.d.ts +19 -0
  132. package/dist/logistic/shipment/shipment.entity.js +67 -0
  133. package/dist/logistic/shipment/shipment.enum.d.ts +16 -0
  134. package/dist/logistic/shipment/shipment.enum.js +22 -0
  135. package/dist/logistic/shipment/shipment.validator.d.ts +18 -0
  136. package/dist/logistic/shipment/shipment.validator.js +65 -0
  137. package/dist/order/purchase/item/index.d.ts +2 -0
  138. package/dist/order/purchase/item/index.js +12 -0
  139. package/dist/order/purchase/item/item.entity.d.ts +11 -0
  140. package/dist/order/purchase/item/item.entity.js +46 -0
  141. package/dist/order/purchase/item/item.validator.d.ts +7 -0
  142. package/dist/order/purchase/item/item.validator.js +41 -0
  143. package/dist/order/purchase/transaction/index.d.ts +3 -0
  144. package/dist/order/purchase/transaction/index.js +17 -0
  145. package/dist/order/purchase/transaction/transaction.entity.d.ts +17 -0
  146. package/dist/order/purchase/transaction/transaction.entity.js +67 -0
  147. package/dist/order/purchase/transaction/transaction.enum.d.ts +8 -0
  148. package/dist/order/purchase/transaction/transaction.enum.js +13 -0
  149. package/dist/order/purchase/transaction/transaction.validator.d.ts +21 -0
  150. package/dist/order/purchase/transaction/transaction.validator.js +87 -0
  151. package/dist/order/purchase/vendor/index.d.ts +2 -0
  152. package/dist/order/purchase/vendor/index.js +12 -0
  153. package/dist/order/purchase/vendor/vendor.entity.d.ts +11 -0
  154. package/dist/order/purchase/vendor/vendor.entity.js +62 -0
  155. package/dist/order/purchase/vendor/vendor.validator.d.ts +18 -0
  156. package/dist/order/purchase/vendor/vendor.validator.js +75 -0
  157. package/dist/order/sale/address/address.validator.d.ts +11 -0
  158. package/dist/order/sale/address/address.validator.js +70 -0
  159. package/dist/order/sale/address/index.d.ts +1 -0
  160. package/dist/order/sale/address/index.js +7 -0
  161. package/dist/order/sale/customer/customer.entity.d.ts +11 -0
  162. package/dist/order/sale/customer/customer.entity.js +62 -0
  163. package/dist/order/sale/customer/customer.validator.d.ts +18 -0
  164. package/dist/order/sale/customer/customer.validator.js +77 -0
  165. package/dist/order/sale/customer/index.d.ts +2 -0
  166. package/dist/order/sale/customer/index.js +12 -0
  167. package/dist/order/sale/item/index.d.ts +2 -0
  168. package/dist/order/sale/item/index.js +12 -0
  169. package/dist/order/sale/item/item.entity.d.ts +10 -0
  170. package/dist/order/sale/item/item.entity.js +45 -0
  171. package/dist/order/sale/item/item.validator.d.ts +5 -0
  172. package/{.output/modules/sale/orders/validators → dist/order/sale/item}/item.validator.js +23 -21
  173. package/dist/order/sale/payment/index.d.ts +1 -0
  174. package/dist/order/sale/payment/index.js +7 -0
  175. package/dist/order/sale/payment/payment.validator.d.ts +16 -0
  176. package/dist/order/sale/payment/payment.validator.js +51 -0
  177. package/dist/order/sale/transaction/index.d.ts +3 -0
  178. package/dist/order/sale/transaction/index.js +17 -0
  179. package/dist/order/sale/transaction/transaction.entity.d.ts +21 -0
  180. package/dist/order/sale/transaction/transaction.entity.js +56 -0
  181. package/dist/order/sale/transaction/transaction.enum.d.ts +8 -0
  182. package/dist/order/sale/transaction/transaction.enum.js +13 -0
  183. package/dist/order/sale/transaction/transaction.validator.d.ts +21 -0
  184. package/dist/order/sale/transaction/transaction.validator.js +76 -0
  185. package/dist/repository.types.d.ts +13 -0
  186. package/package.json +102 -86
  187. package/.output/abstracts/abstract.entity.d.ts +0 -14
  188. package/.output/abstracts/abstract.validator.d.ts +0 -24
  189. package/.output/abstracts/abstract.validator.js +0 -118
  190. package/.output/exceptions/missing-identity.exception.d.ts +0 -5
  191. package/.output/exceptions/missing-identity.exception.js +0 -30
  192. package/.output/modules/asset/files/file.entity.d.ts +0 -9
  193. package/.output/modules/asset/files/file.schema.d.ts +0 -34
  194. package/.output/modules/asset/files/file.schema.js +0 -10
  195. package/.output/modules/auth/organizations/organization.entity.d.ts +0 -8
  196. package/.output/modules/auth/users/user.entity.d.ts +0 -9
  197. package/.output/modules/auth/users/user.schema.d.ts +0 -34
  198. package/.output/modules/auth/users/user.schema.js +0 -10
  199. package/.output/modules/auth/users/user.validator.d.ts +0 -12
  200. package/.output/modules/auth/users/user.validator.js +0 -58
  201. package/.output/modules/inventory/brands/brand.entity.d.ts +0 -6
  202. package/.output/modules/inventory/brands/brand.schema.d.ts +0 -34
  203. package/.output/modules/inventory/brands/brand.schema.js +0 -10
  204. package/.output/modules/inventory/brands/brand.validator.d.ts +0 -11
  205. package/.output/modules/inventory/brands/brand.validator.js +0 -74
  206. package/.output/modules/inventory/categories/category.entity.d.ts +0 -6
  207. package/.output/modules/inventory/categories/category.schema.d.ts +0 -34
  208. package/.output/modules/inventory/categories/category.schema.js +0 -10
  209. package/.output/modules/inventory/categories/category.validator.d.ts +0 -8
  210. package/.output/modules/inventory/categories/category.validator.js +0 -42
  211. package/.output/modules/inventory/products/documents/attribute.document.d.ts +0 -5
  212. package/.output/modules/inventory/products/documents/attribute.document.js +0 -33
  213. package/.output/modules/inventory/products/documents/dimension.document.d.ts +0 -6
  214. package/.output/modules/inventory/products/documents/dimension.document.js +0 -35
  215. package/.output/modules/inventory/products/product.entity.d.ts +0 -19
  216. package/.output/modules/inventory/products/product.schema.d.ts +0 -34
  217. package/.output/modules/inventory/products/product.schema.js +0 -18
  218. package/.output/modules/inventory/products/product.validator.d.ts +0 -29
  219. package/.output/modules/inventory/products/product.validator.js +0 -181
  220. package/.output/modules/inventory/products/validators/attributes.validator.d.ts +0 -5
  221. package/.output/modules/inventory/products/validators/attributes.validator.js +0 -35
  222. package/.output/modules/inventory/products/validators/dimension.validator.d.ts +0 -6
  223. package/.output/modules/inventory/products/validators/dimension.validator.js +0 -38
  224. package/.output/modules/sale/customers/customer.entity.d.ts +0 -8
  225. package/.output/modules/sale/customers/customer.schema.d.ts +0 -34
  226. package/.output/modules/sale/customers/customer.schema.js +0 -10
  227. package/.output/modules/sale/customers/customer.validator.d.ts +0 -14
  228. package/.output/modules/sale/customers/customer.validator.js +0 -94
  229. package/.output/modules/sale/orders/documents/address.document.d.ts +0 -8
  230. package/.output/modules/sale/orders/documents/address.document.js +0 -43
  231. package/.output/modules/sale/orders/documents/status.document.d.ts +0 -8
  232. package/.output/modules/sale/orders/documents/status.document.js +0 -34
  233. package/.output/modules/sale/orders/entities/item.entity.d.ts +0 -38
  234. package/.output/modules/sale/orders/enums/order.status.d.ts +0 -6
  235. package/.output/modules/sale/orders/enums/order.status.js +0 -10
  236. package/.output/modules/sale/orders/order.entity.d.ts +0 -21
  237. package/.output/modules/sale/orders/order.validator.d.ts +0 -16
  238. package/.output/modules/sale/orders/order.validator.js +0 -86
  239. package/.output/modules/sale/orders/validators/address.validator.d.ts +0 -17
  240. package/.output/modules/sale/orders/validators/address.validator.js +0 -81
  241. package/.output/modules/sale/orders/validators/billing.validator.d.ts +0 -8
  242. package/.output/modules/sale/orders/validators/billing.validator.js +0 -13
  243. package/.output/modules/sale/orders/validators/item.validator.d.ts +0 -5
  244. package/.output/modules/sale/orders/validators/payment.validator.d.ts +0 -10
  245. package/.output/modules/sale/orders/validators/payment.validator.js +0 -62
  246. package/.output/modules/sale/orders/validators/shipping.validator.d.ts +0 -9
  247. package/.output/modules/sale/orders/validators/shipping.validator.js +0 -14
  248. package/.output/modules/sale/payments/entities/status.entity.d.ts +0 -8
  249. package/.output/modules/sale/payments/enums/billing.type.d.ts +0 -6
  250. package/.output/modules/sale/payments/enums/billing.type.js +0 -10
  251. package/.output/modules/sale/payments/enums/payment.status.d.ts +0 -7
  252. package/.output/modules/sale/payments/enums/payment.status.js +0 -11
  253. package/.output/modules/sale/payments/enums/shipping.type.d.ts +0 -4
  254. package/.output/modules/sale/payments/enums/shipping.type.js +0 -8
  255. package/.output/modules/sale/payments/payment.entity.d.ts +0 -12
  256. package/.output/modules/sale/payments/payment.schema.d.ts +0 -34
  257. package/.output/modules/sale/payments/payment.schema.js +0 -14
  258. package/.output/modules/sale/payments/payment.validator.d.ts +0 -16
  259. package/.output/modules/sale/payments/payment.validator.js +0 -77
  260. package/.output/tsconfig.package.tsbuildinfo +0 -1
  261. package/README.md +0 -79
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProductSchema = void 0;
4
- var mongoose_1 = require("@nestjs/mongoose");
5
- var product_entity_1 = require("./product.entity");
6
- var ProductSchema;
7
- (function (ProductSchema) {
8
- ProductSchema.name = 'inventory_products';
9
- ProductSchema.schema = mongoose_1.SchemaFactory.createForClass(product_entity_1.ProductEntity);
10
- ProductSchema.schema.index({
11
- description: 'text',
12
- name: 'text',
13
- });
14
- ProductSchema.schema.virtual('image').get(function () {
15
- var first = this.pictures[0];
16
- return first === null || first === void 0 ? void 0 : first.url;
17
- });
18
- })(ProductSchema || (exports.ProductSchema = ProductSchema = {}));
@@ -1,29 +0,0 @@
1
- import { AbstractValidator } from '../../../abstracts/abstract.validator';
2
- import { ProductEntity } from './product.entity';
3
- import { AttributesValidator } from './validators/attributes.validator';
4
- import { DimensionValidator } from './validators/dimension.validator';
5
- export declare class CreateProductValidator extends AbstractValidator {
6
- active?: boolean;
7
- hashtags?: string[];
8
- name: string;
9
- description: string;
10
- price: number;
11
- pictures: string[];
12
- category?: string;
13
- brand?: string;
14
- dimension: DimensionValidator;
15
- attributes: AttributesValidator;
16
- }
17
- export declare class UpdateProductValidator {
18
- active?: boolean;
19
- hashtags: string[];
20
- name?: string;
21
- description?: string;
22
- price?: number;
23
- category?: string;
24
- brand?: string;
25
- pictures: string[];
26
- dimension: DimensionValidator;
27
- attributes: AttributesValidator;
28
- constructor(entity: ProductEntity);
29
- }
@@ -1,181 +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.UpdateProductValidator = exports.CreateProductValidator = 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 attributes_validator_1 = require("./validators/attributes.validator");
32
- var dimension_validator_1 = require("./validators/dimension.validator");
33
- var CreateProductValidator = exports.CreateProductValidator = (function (_super) {
34
- __extends(CreateProductValidator, _super);
35
- function CreateProductValidator() {
36
- var _this = _super !== null && _super.apply(this, arguments) || this;
37
- _this.active = true;
38
- _this.hashtags = [];
39
- _this.pictures = [];
40
- _this.dimension = new dimension_validator_1.DimensionValidator();
41
- _this.attributes = new attributes_validator_1.AttributesValidator();
42
- return _this;
43
- }
44
- __decorate([
45
- (0, class_validator_1.IsBoolean)(),
46
- (0, class_validator_1.IsOptional)(),
47
- __metadata("design:type", Object)
48
- ], CreateProductValidator.prototype, "active", void 0);
49
- __decorate([
50
- (0, class_validator_1.IsString)({ each: true }),
51
- (0, class_validator_1.IsNotEmpty)({ each: true }),
52
- (0, class_validator_1.IsOptional)(),
53
- __metadata("design:type", Array)
54
- ], CreateProductValidator.prototype, "hashtags", void 0);
55
- __decorate([
56
- (0, class_validator_1.IsString)(),
57
- (0, class_validator_1.IsNotEmpty)(),
58
- __metadata("design:type", String)
59
- ], CreateProductValidator.prototype, "name", void 0);
60
- __decorate([
61
- (0, class_validator_1.IsString)(),
62
- (0, class_validator_1.IsOptional)(),
63
- __metadata("design:type", String)
64
- ], CreateProductValidator.prototype, "description", void 0);
65
- __decorate([
66
- (0, class_validator_1.IsNumber)(),
67
- (0, class_validator_1.IsPositive)(),
68
- __metadata("design:type", Number)
69
- ], CreateProductValidator.prototype, "price", void 0);
70
- __decorate([
71
- (0, class_validator_1.IsMongoId)({ each: true }),
72
- (0, class_validator_1.IsArray)(),
73
- (0, class_validator_1.IsOptional)(),
74
- __metadata("design:type", Array)
75
- ], CreateProductValidator.prototype, "pictures", void 0);
76
- __decorate([
77
- (0, class_validator_1.IsOptional)(),
78
- (0, class_validator_1.IsMongoId)(),
79
- __metadata("design:type", String)
80
- ], CreateProductValidator.prototype, "category", void 0);
81
- __decorate([
82
- (0, class_validator_1.IsOptional)(),
83
- (0, class_validator_1.IsMongoId)(),
84
- __metadata("design:type", String)
85
- ], CreateProductValidator.prototype, "brand", void 0);
86
- __decorate([
87
- (0, class_transformer_1.Type)(function () { return dimension_validator_1.DimensionValidator; }),
88
- (0, class_validator_1.ValidateNested)(),
89
- (0, class_validator_1.IsOptional)(),
90
- __metadata("design:type", Object)
91
- ], CreateProductValidator.prototype, "dimension", void 0);
92
- __decorate([
93
- (0, class_transformer_1.Type)(function () { return attributes_validator_1.AttributesValidator; }),
94
- (0, class_validator_1.ValidateNested)(),
95
- (0, class_validator_1.IsOptional)(),
96
- __metadata("design:type", Object)
97
- ], CreateProductValidator.prototype, "attributes", void 0);
98
- return CreateProductValidator;
99
- }(abstract_validator_1.AbstractValidator));
100
- var UpdateProductValidator = exports.UpdateProductValidator = (function () {
101
- function UpdateProductValidator(entity) {
102
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
103
- this.hashtags = [];
104
- this.pictures = [];
105
- this.attributes = new attributes_validator_1.AttributesValidator();
106
- this.active = entity.active;
107
- this.name = entity.name;
108
- this.description = entity.description;
109
- this.price = entity.price;
110
- this.hashtags = entity.hashtags;
111
- this.category = (_a = entity.category) === null || _a === void 0 ? void 0 : _a._id;
112
- this.brand = (_b = entity.brand) === null || _b === void 0 ? void 0 : _b._id;
113
- this.pictures = entity.pictures.map(function (file) { return file._id; });
114
- this.attributes = new attributes_validator_1.AttributesValidator();
115
- this.attributes.sku = (_c = entity.attributes) === null || _c === void 0 ? void 0 : _c.sku;
116
- this.attributes.stock = (_d = entity.attributes) === null || _d === void 0 ? void 0 : _d.stock;
117
- this.attributes.units = (_e = entity.attributes) === null || _e === void 0 ? void 0 : _e.units;
118
- this.dimension = new dimension_validator_1.DimensionValidator();
119
- this.dimension.depth = (_f = entity.dimension) === null || _f === void 0 ? void 0 : _f.depth;
120
- this.dimension.height = (_g = entity.dimension) === null || _g === void 0 ? void 0 : _g.height;
121
- this.dimension.weight = (_h = entity.dimension) === null || _h === void 0 ? void 0 : _h.weight;
122
- this.dimension.width = (_j = entity.dimension) === null || _j === void 0 ? void 0 : _j.width;
123
- }
124
- __decorate([
125
- (0, class_validator_1.IsBoolean)(),
126
- (0, class_validator_1.IsOptional)(),
127
- __metadata("design:type", Boolean)
128
- ], UpdateProductValidator.prototype, "active", void 0);
129
- __decorate([
130
- (0, class_validator_1.IsString)({ each: true }),
131
- (0, class_validator_1.IsNotEmpty)({ each: true }),
132
- (0, class_validator_1.IsOptional)(),
133
- __metadata("design:type", Array)
134
- ], UpdateProductValidator.prototype, "hashtags", void 0);
135
- __decorate([
136
- (0, class_validator_1.IsOptional)(),
137
- (0, class_validator_1.IsString)(),
138
- (0, class_validator_1.IsNotEmpty)(),
139
- __metadata("design:type", String)
140
- ], UpdateProductValidator.prototype, "name", void 0);
141
- __decorate([
142
- (0, class_validator_1.IsOptional)(),
143
- (0, class_validator_1.IsString)(),
144
- (0, class_validator_1.IsOptional)(),
145
- __metadata("design:type", String)
146
- ], UpdateProductValidator.prototype, "description", void 0);
147
- __decorate([
148
- (0, class_validator_1.IsOptional)(),
149
- (0, class_validator_1.IsNumber)(),
150
- __metadata("design:type", Number)
151
- ], UpdateProductValidator.prototype, "price", void 0);
152
- __decorate([
153
- (0, class_validator_1.IsOptional)(),
154
- (0, class_validator_1.IsMongoId)(),
155
- __metadata("design:type", String)
156
- ], UpdateProductValidator.prototype, "category", void 0);
157
- __decorate([
158
- (0, class_validator_1.IsOptional)(),
159
- (0, class_validator_1.IsMongoId)(),
160
- __metadata("design:type", String)
161
- ], UpdateProductValidator.prototype, "brand", void 0);
162
- __decorate([
163
- (0, class_validator_1.IsMongoId)({ each: true }),
164
- (0, class_validator_1.IsArray)(),
165
- (0, class_validator_1.IsOptional)(),
166
- __metadata("design:type", Array)
167
- ], UpdateProductValidator.prototype, "pictures", void 0);
168
- __decorate([
169
- (0, class_transformer_1.Type)(function () { return dimension_validator_1.DimensionValidator; }),
170
- (0, class_validator_1.ValidateNested)(),
171
- (0, class_validator_1.IsOptional)(),
172
- __metadata("design:type", dimension_validator_1.DimensionValidator)
173
- ], UpdateProductValidator.prototype, "dimension", void 0);
174
- __decorate([
175
- (0, class_transformer_1.Type)(function () { return attributes_validator_1.AttributesValidator; }),
176
- (0, class_validator_1.ValidateNested)(),
177
- (0, class_validator_1.IsOptional)(),
178
- __metadata("design:type", attributes_validator_1.AttributesValidator)
179
- ], UpdateProductValidator.prototype, "attributes", void 0);
180
- return UpdateProductValidator;
181
- }());
@@ -1,5 +0,0 @@
1
- export declare class AttributesValidator {
2
- units: number;
3
- stock: number | null;
4
- sku: string;
5
- }
@@ -1,35 +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.AttributesValidator = void 0;
13
- var class_validator_1 = require("class-validator");
14
- var AttributesValidator = exports.AttributesValidator = (function () {
15
- function AttributesValidator() {
16
- this.units = 1;
17
- this.stock = null;
18
- }
19
- __decorate([
20
- (0, class_validator_1.IsPositive)(),
21
- __metadata("design:type", Object)
22
- ], AttributesValidator.prototype, "units", void 0);
23
- __decorate([
24
- (0, class_validator_1.IsNumber)(),
25
- (0, class_validator_1.IsOptional)(),
26
- __metadata("design:type", Number)
27
- ], AttributesValidator.prototype, "stock", void 0);
28
- __decorate([
29
- (0, class_validator_1.IsString)(),
30
- (0, class_validator_1.IsOptional)(),
31
- (0, class_validator_1.IsOptional)(),
32
- __metadata("design:type", String)
33
- ], AttributesValidator.prototype, "sku", void 0);
34
- return AttributesValidator;
35
- }());
@@ -1,6 +0,0 @@
1
- export declare class DimensionValidator {
2
- weight: number;
3
- height: number;
4
- width: number;
5
- depth: number;
6
- }
@@ -1,38 +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.DimensionValidator = void 0;
13
- var class_validator_1 = require("class-validator");
14
- var DimensionValidator = exports.DimensionValidator = (function () {
15
- function DimensionValidator() {
16
- }
17
- __decorate([
18
- (0, class_validator_1.IsPositive)(),
19
- (0, class_validator_1.IsOptional)(),
20
- __metadata("design:type", Number)
21
- ], DimensionValidator.prototype, "weight", void 0);
22
- __decorate([
23
- (0, class_validator_1.IsPositive)(),
24
- (0, class_validator_1.IsOptional)(),
25
- __metadata("design:type", Number)
26
- ], DimensionValidator.prototype, "height", void 0);
27
- __decorate([
28
- (0, class_validator_1.IsPositive)(),
29
- (0, class_validator_1.IsOptional)(),
30
- __metadata("design:type", Number)
31
- ], DimensionValidator.prototype, "width", void 0);
32
- __decorate([
33
- (0, class_validator_1.IsPositive)(),
34
- (0, class_validator_1.IsOptional)(),
35
- __metadata("design:type", Number)
36
- ], DimensionValidator.prototype, "depth", void 0);
37
- return DimensionValidator;
38
- }());
@@ -1,8 +0,0 @@
1
- import { AbstractEntity } from '../../../abstracts/abstract.entity';
2
- import { AddressValidator } from '../orders/validators/address.validator';
3
- export declare class CustomerEntity extends AbstractEntity {
4
- name: string;
5
- email: string;
6
- phone: string;
7
- addresses: AddressValidator[];
8
- }
@@ -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 { CustomerEntity } from './customer.entity';
27
- export declare namespace CustomerSchema {
28
- const name = "sale_customers";
29
- const schema: import("mongoose").Schema<CustomerEntity, import("mongoose").Model<CustomerEntity, any, any, any, import("mongoose").Document<unknown, any, CustomerEntity> & CustomerEntity & Required<{
30
- _id: string;
31
- }>, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, CustomerEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<CustomerEntity>> & import("mongoose").FlatRecord<CustomerEntity> & Required<{
32
- _id: string;
33
- }>>;
34
- }
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CustomerSchema = void 0;
4
- var mongoose_1 = require("@nestjs/mongoose");
5
- var customer_entity_1 = require("./customer.entity");
6
- var CustomerSchema;
7
- (function (CustomerSchema) {
8
- CustomerSchema.name = 'sale_customers';
9
- CustomerSchema.schema = mongoose_1.SchemaFactory.createForClass(customer_entity_1.CustomerEntity);
10
- })(CustomerSchema || (exports.CustomerSchema = CustomerSchema = {}));
@@ -1,14 +0,0 @@
1
- import { AbstractValidator } from '../../../abstracts/abstract.validator';
2
- import { AddressValidator } from '../orders/validators/address.validator';
3
- export declare class CreateCustomerValidator extends AbstractValidator {
4
- name: string;
5
- email: string;
6
- phone?: string;
7
- addresses?: AddressValidator[];
8
- }
9
- export declare class UpdateCustomerValidator {
10
- name?: string;
11
- email?: string;
12
- phone?: string;
13
- addresses?: AddressValidator[];
14
- }
@@ -1,94 +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.UpdateCustomerValidator = exports.CreateCustomerValidator = 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 address_validator_1 = require("../orders/validators/address.validator");
32
- var CreateCustomerValidator = exports.CreateCustomerValidator = (function (_super) {
33
- __extends(CreateCustomerValidator, _super);
34
- function CreateCustomerValidator() {
35
- var _this = _super !== null && _super.apply(this, arguments) || this;
36
- _this.addresses = [];
37
- return _this;
38
- }
39
- __decorate([
40
- (0, class_validator_1.IsString)(),
41
- __metadata("design:type", String)
42
- ], CreateCustomerValidator.prototype, "name", void 0);
43
- __decorate([
44
- (0, class_validator_1.IsEmail)(),
45
- (0, class_transformer_1.Transform)(function (_a) {
46
- var value = _a.value;
47
- return String(value).toLowerCase();
48
- }),
49
- __metadata("design:type", String)
50
- ], CreateCustomerValidator.prototype, "email", void 0);
51
- __decorate([
52
- (0, class_validator_1.IsString)(),
53
- (0, class_validator_1.IsOptional)(),
54
- __metadata("design:type", String)
55
- ], CreateCustomerValidator.prototype, "phone", void 0);
56
- __decorate([
57
- (0, class_validator_1.IsArray)(),
58
- (0, class_transformer_1.Type)(function () { return address_validator_1.AddressValidator; }),
59
- (0, class_validator_1.ValidateNested)(),
60
- __metadata("design:type", Array)
61
- ], CreateCustomerValidator.prototype, "addresses", void 0);
62
- return CreateCustomerValidator;
63
- }(abstract_validator_1.AbstractValidator));
64
- var UpdateCustomerValidator = exports.UpdateCustomerValidator = (function () {
65
- function UpdateCustomerValidator() {
66
- }
67
- __decorate([
68
- (0, class_validator_1.IsString)(),
69
- (0, class_validator_1.IsOptional)(),
70
- __metadata("design:type", String)
71
- ], UpdateCustomerValidator.prototype, "name", void 0);
72
- __decorate([
73
- (0, class_validator_1.IsEmail)(),
74
- (0, class_transformer_1.Transform)(function (_a) {
75
- var value = _a.value;
76
- return String(value).toLowerCase();
77
- }),
78
- (0, class_validator_1.IsOptional)(),
79
- __metadata("design:type", String)
80
- ], UpdateCustomerValidator.prototype, "email", void 0);
81
- __decorate([
82
- (0, class_validator_1.IsPhoneNumber)(),
83
- (0, class_validator_1.IsOptional)(),
84
- __metadata("design:type", String)
85
- ], UpdateCustomerValidator.prototype, "phone", void 0);
86
- __decorate([
87
- (0, class_validator_1.IsArray)(),
88
- (0, class_transformer_1.Type)(function () { return address_validator_1.AddressValidator; }),
89
- (0, class_validator_1.ValidateNested)(),
90
- (0, class_validator_1.IsOptional)(),
91
- __metadata("design:type", Array)
92
- ], UpdateCustomerValidator.prototype, "addresses", void 0);
93
- return UpdateCustomerValidator;
94
- }());
@@ -1,8 +0,0 @@
1
- export declare class AddressDocument {
2
- line1: string;
3
- line2: string;
4
- state: string;
5
- city: string;
6
- country: string;
7
- code: string;
8
- }
@@ -1,43 +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.AddressDocument = void 0;
13
- var mongoose_1 = require("@nestjs/mongoose");
14
- var mongoose_2 = require("mongoose");
15
- var AddressDocument = exports.AddressDocument = (function () {
16
- function AddressDocument() {
17
- }
18
- __decorate([
19
- (0, mongoose_1.Prop)({ required: true, type: mongoose_2.Schema.Types.String }),
20
- __metadata("design:type", String)
21
- ], AddressDocument.prototype, "line1", void 0);
22
- __decorate([
23
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
24
- __metadata("design:type", String)
25
- ], AddressDocument.prototype, "line2", void 0);
26
- __decorate([
27
- (0, mongoose_1.Prop)({ required: true, type: mongoose_2.Schema.Types.String }),
28
- __metadata("design:type", String)
29
- ], AddressDocument.prototype, "state", void 0);
30
- __decorate([
31
- (0, mongoose_1.Prop)({ required: true, type: mongoose_2.Schema.Types.String }),
32
- __metadata("design:type", String)
33
- ], AddressDocument.prototype, "city", void 0);
34
- __decorate([
35
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
36
- __metadata("design:type", String)
37
- ], AddressDocument.prototype, "country", void 0);
38
- __decorate([
39
- (0, mongoose_1.Prop)({ required: true, type: mongoose_2.Schema.Types.String }),
40
- __metadata("design:type", String)
41
- ], AddressDocument.prototype, "code", void 0);
42
- return AddressDocument;
43
- }());
@@ -1,8 +0,0 @@
1
- import { MaybeEntity } from '../../../../abstracts/abstract.entity';
2
- import { UserEntity } from '../../../auth/users/user.entity';
3
- import { OrderStatus } from '../enums/order.status';
4
- export declare class StatusDocument {
5
- name: OrderStatus;
6
- user: MaybeEntity<UserEntity>;
7
- date: Date;
8
- }
@@ -1,34 +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.StatusDocument = void 0;
13
- var mongoose_1 = require("@nestjs/mongoose");
14
- var mongoose_2 = require("mongoose");
15
- var user_schema_1 = require("../../../auth/users/user.schema");
16
- var order_status_1 = require("../enums/order.status");
17
- var StatusDocument = exports.StatusDocument = (function () {
18
- function StatusDocument() {
19
- this.date = new Date();
20
- }
21
- __decorate([
22
- (0, mongoose_1.Prop)({ default: order_status_1.OrderStatus.CREATED, enum: order_status_1.OrderStatus, required: true, type: mongoose_2.Schema.Types.String }),
23
- __metadata("design:type", String)
24
- ], StatusDocument.prototype, "name", void 0);
25
- __decorate([
26
- (0, mongoose_1.Prop)({ ref: user_schema_1.UserSchema.name, required: true, type: mongoose_2.Schema.Types.ObjectId }),
27
- __metadata("design:type", Object)
28
- ], StatusDocument.prototype, "user", void 0);
29
- __decorate([
30
- (0, mongoose_1.Prop)({ default: function () { return new Date(); }, type: mongoose_2.Schema.Types.Date }),
31
- __metadata("design:type", Object)
32
- ], StatusDocument.prototype, "date", void 0);
33
- return StatusDocument;
34
- }());
@@ -1,38 +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/types/inferschematype" />
25
- import { Schema } from 'mongoose';
26
- import type { MaybeEntity } from '../../../../abstracts/abstract.entity';
27
- import { ProductEntity } from '../../../inventory/products/product.entity';
28
- export declare class ItemEntity {
29
- product: MaybeEntity<ProductEntity>;
30
- price?: number;
31
- quantity: number;
32
- description: string;
33
- }
34
- export declare const ItemSchema: Schema<ItemEntity, import("mongoose").Model<ItemEntity, any, any, any, import("mongoose").Document<unknown, any, ItemEntity> & ItemEntity & {
35
- _id: import("mongoose").Types.ObjectId;
36
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ItemEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<ItemEntity>> & import("mongoose").FlatRecord<ItemEntity> & {
37
- _id: import("mongoose").Types.ObjectId;
38
- }>;
@@ -1,6 +0,0 @@
1
- export declare enum OrderStatus {
2
- CREATED = "CREATED",
3
- ACCEPTED = "ACCEPTED",
4
- COMPLETED = "COMPLETED",
5
- CANCELED = "CANCELED"
6
- }
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OrderStatus = void 0;
4
- var OrderStatus;
5
- (function (OrderStatus) {
6
- OrderStatus["CREATED"] = "CREATED";
7
- OrderStatus["ACCEPTED"] = "ACCEPTED";
8
- OrderStatus["COMPLETED"] = "COMPLETED";
9
- OrderStatus["CANCELED"] = "CANCELED";
10
- })(OrderStatus || (exports.OrderStatus = OrderStatus = {}));