@merkaly/api 0.2.2-9 → 0.2.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 (159) hide show
  1. package/.output/abstract/abstract.document.d.ts +10 -0
  2. package/.output/abstract/abstract.document.js +13 -0
  3. package/.output/{configs/app.entity.d.ts → abstract/abstract.entity.d.ts} +3 -3
  4. package/.output/abstract/abstract.entity.js +54 -0
  5. package/.output/abstract/abstract.fixture.d.ts +4 -0
  6. package/.output/abstract/abstract.fixture.js +11 -0
  7. package/.output/abstract/abstract.validator.d.ts +18 -0
  8. package/.output/abstract/abstract.validator.js +73 -0
  9. package/.output/modules/assets/asset.entity.d.ts +2 -2
  10. package/.output/modules/assets/asset.entity.js +59 -33
  11. package/.output/modules/content/banners/banner.document.d.ts +6 -0
  12. package/.output/modules/content/banners/banner.document.js +30 -0
  13. package/.output/modules/content/banners/banner.entity.d.ts +7 -0
  14. package/.output/modules/content/banners/banner.entity.js +54 -0
  15. package/.output/modules/content/banners/banner.fixture.d.ts +5 -0
  16. package/.output/modules/content/banners/banner.fixture.js +39 -0
  17. package/.output/modules/content/banners/banner.validator.d.ts +8 -0
  18. package/.output/modules/content/banners/banner.validator.js +63 -0
  19. package/.output/modules/content/pages/page.document.d.ts +10 -0
  20. package/.output/modules/content/pages/page.document.js +32 -0
  21. package/.output/modules/content/pages/page.entity.d.ts +11 -0
  22. package/.output/modules/content/pages/page.entity.js +69 -0
  23. package/.output/modules/content/pages/page.fixture.d.ts +5 -0
  24. package/.output/modules/content/pages/page.fixture.js +39 -0
  25. package/.output/modules/content/pages/page.types.d.ts +8 -0
  26. package/.output/modules/content/pages/page.types.js +13 -0
  27. package/.output/modules/content/pages/page.validator.d.ts +11 -0
  28. package/.output/modules/content/pages/page.validator.js +73 -0
  29. package/.output/modules/insight/validators/order.validator.d.ts +4 -0
  30. package/.output/modules/insight/validators/order.validator.js +27 -0
  31. package/.output/modules/inventory/brands/brand.document.d.ts +5 -0
  32. package/.output/modules/inventory/brands/brand.document.js +30 -0
  33. package/.output/modules/inventory/brands/brand.entity.d.ts +2 -2
  34. package/.output/modules/inventory/brands/brand.entity.js +40 -17
  35. package/.output/modules/inventory/brands/brand.validator.js +34 -25
  36. package/.output/modules/inventory/categories/category.document.d.ts +6 -0
  37. package/.output/modules/inventory/categories/category.document.js +31 -0
  38. package/.output/modules/inventory/categories/category.entity.d.ts +5 -2
  39. package/.output/modules/inventory/categories/category.entity.js +51 -17
  40. package/.output/modules/inventory/categories/category.fixture.d.ts +5 -0
  41. package/.output/modules/inventory/categories/category.fixture.js +38 -0
  42. package/.output/modules/inventory/categories/category.validator.d.ts +2 -0
  43. package/.output/modules/inventory/categories/category.validator.js +46 -25
  44. package/.output/modules/inventory/products/entities/code.entity.d.ts +5 -0
  45. package/.output/modules/inventory/products/entities/code.entity.js +53 -0
  46. package/.output/modules/inventory/products/entities/dimension.entity.d.ts +6 -0
  47. package/.output/modules/inventory/products/entities/dimension.entity.js +57 -0
  48. package/.output/modules/inventory/products/entities/price.entity.d.ts +4 -0
  49. package/.output/modules/inventory/products/entities/price.entity.js +49 -0
  50. package/.output/modules/inventory/products/entities/seo.entity.d.ts +5 -0
  51. package/.output/modules/inventory/products/entities/seo.entity.js +53 -0
  52. package/.output/modules/inventory/products/product.document.d.ts +24 -0
  53. package/.output/modules/inventory/products/product.document.js +33 -0
  54. package/.output/modules/inventory/products/product.entity.d.ts +13 -3
  55. package/.output/modules/inventory/products/product.entity.js +91 -36
  56. package/.output/modules/inventory/products/product.fixture.d.ts +5 -0
  57. package/.output/modules/inventory/products/product.fixture.js +54 -0
  58. package/.output/modules/inventory/products/product.validator.d.ts +15 -11
  59. package/.output/modules/inventory/products/product.validator.js +107 -65
  60. package/.output/modules/inventory/products/validators/code.validator.d.ts +5 -0
  61. package/.output/modules/inventory/products/validators/code.validator.js +37 -0
  62. package/.output/modules/inventory/products/validators/dimension.validator.d.ts +6 -0
  63. package/.output/modules/inventory/products/validators/dimension.validator.js +43 -0
  64. package/.output/modules/inventory/products/validators/price.validator.d.ts +4 -0
  65. package/.output/modules/inventory/products/validators/price.validator.js +30 -0
  66. package/.output/modules/inventory/products/validators/seo.validator.d.ts +5 -0
  67. package/.output/modules/inventory/products/validators/seo.validator.js +37 -0
  68. package/.output/modules/inventory/properties/property.entity.d.ts +7 -0
  69. package/.output/modules/inventory/properties/property.entity.js +55 -0
  70. package/.output/modules/inventory/properties/property.validator.d.ts +12 -0
  71. package/.output/modules/inventory/properties/property.validator.js +51 -0
  72. package/.output/modules/sales/clients/client.entity.d.ts +12 -0
  73. package/.output/modules/sales/clients/client.entity.js +73 -0
  74. package/.output/modules/sales/clients/client.validator.d.ts +12 -0
  75. package/.output/modules/sales/clients/client.validator.js +67 -0
  76. package/.output/modules/{store/orders/billing/billing.validator.d.ts → sales/orders/billing/billing.document.d.ts} +4 -4
  77. package/.output/modules/sales/orders/billing/billing.document.js +9 -0
  78. package/.output/modules/{store → sales}/orders/billing/billing.entity.d.ts +0 -0
  79. package/.output/modules/sales/orders/billing/billing.entity.js +44 -0
  80. package/.output/modules/sales/orders/billing/billing.validator.d.ts +7 -0
  81. package/.output/modules/sales/orders/billing/billing.validator.js +40 -0
  82. package/.output/modules/sales/orders/item/item.document.d.ts +6 -0
  83. package/.output/modules/sales/orders/item/item.document.js +9 -0
  84. package/.output/modules/sales/orders/item/item.entity.d.ts +7 -0
  85. package/.output/modules/sales/orders/item/item.entity.js +54 -0
  86. package/.output/modules/{store/orders/item/item.entity.d.ts → sales/orders/item/item.schema.d.ts} +3 -9
  87. package/.output/modules/sales/orders/item/item.schema.js +6 -0
  88. package/.output/modules/{store → sales}/orders/item/item.validator.d.ts +0 -0
  89. package/.output/modules/sales/orders/item/item.validator.js +29 -0
  90. package/.output/modules/sales/orders/order.entity.d.ts +19 -0
  91. package/.output/modules/sales/orders/order.entity.js +82 -0
  92. package/.output/modules/sales/orders/order.validator.d.ts +18 -0
  93. package/.output/modules/sales/orders/order.validator.js +75 -0
  94. package/.output/modules/sales/orders/payment/payment.entity.d.ts +4 -0
  95. package/.output/modules/sales/orders/payment/payment.entity.js +28 -0
  96. package/.output/modules/sales/orders/payment/payment.schema.d.ts +27 -0
  97. package/.output/modules/sales/orders/payment/payment.schema.js +6 -0
  98. package/.output/modules/sales/orders/payment/payment.validator.d.ts +6 -0
  99. package/.output/modules/sales/orders/payment/payment.validator.js +10 -0
  100. package/.output/modules/{store/orders/shipping/shipping.validator.d.ts → sales/orders/shipping/shipping.document.d.ts} +4 -4
  101. package/.output/modules/sales/orders/shipping/shipping.document.js +9 -0
  102. package/.output/modules/{store → sales}/orders/shipping/shipping.entity.d.ts +0 -0
  103. package/.output/modules/sales/orders/shipping/shipping.entity.js +44 -0
  104. package/.output/modules/sales/orders/shipping/shipping.validator.d.ts +7 -0
  105. package/.output/modules/sales/orders/shipping/shipping.validator.js +40 -0
  106. package/.output/modules/sales/orders/status/status.document.d.ts +5 -0
  107. package/.output/modules/sales/orders/status/status.document.js +9 -0
  108. package/.output/modules/sales/orders/status/status.entity.d.ts +6 -0
  109. package/.output/modules/sales/orders/status/status.entity.js +37 -0
  110. package/.output/modules/sales/orders/status/status.validator.d.ts +8 -0
  111. package/.output/modules/sales/orders/status/status.validator.js +12 -0
  112. package/.output/modules/search/search.validator.d.ts +6 -0
  113. package/.output/modules/search/search.validator.js +49 -0
  114. package/.output/modules/{auth → setting}/connections/connection.validator.d.ts +0 -1
  115. package/.output/modules/setting/connections/connection.validator.js +37 -0
  116. package/.output/modules/setting/layout/layout.document.d.ts +5 -0
  117. package/.output/modules/setting/layout/layout.document.js +29 -0
  118. package/.output/modules/setting/layout/layout.entity.d.ts +6 -0
  119. package/.output/modules/setting/layout/layout.entity.js +46 -0
  120. package/.output/modules/{auth → setting}/members/member.validator.d.ts +0 -1
  121. package/.output/modules/{auth → setting}/members/member.validator.js +0 -1
  122. package/.output/modules/setting/organization/organization.document.d.ts +15 -0
  123. package/.output/modules/setting/organization/organization.document.js +31 -0
  124. package/.output/modules/setting/organization/organization.entity.d.ts +4 -0
  125. package/.output/modules/setting/organization/organization.entity.js +28 -0
  126. package/.output/modules/setting/organization/organization.types.d.ts +22 -0
  127. package/.output/modules/setting/organization/organization.types.js +102 -0
  128. package/.output/modules/setting/organization/organization.validator.d.ts +17 -0
  129. package/.output/modules/setting/organization/organization.validator.js +83 -0
  130. package/.output/modules/setting/theme/theme.entity.d.ts +6 -0
  131. package/.output/modules/setting/theme/theme.entity.js +46 -0
  132. package/.output/modules/users/user.validator.d.ts +10 -0
  133. package/.output/modules/users/user.validator.js +50 -0
  134. package/.output/types.d.ts +23 -0
  135. package/.output/types.js +2 -0
  136. package/package.json +21 -9
  137. package/.output/configs/app.entity.js +0 -28
  138. package/.output/main.d.ts +0 -0
  139. package/.output/modules/auth/connections/connection.validator.js +0 -29
  140. package/.output/modules/auth/organizations/organization.validator.d.ts +0 -6
  141. package/.output/modules/auth/organizations/organization.validator.js +0 -27
  142. package/.output/modules/settings/payments/payment.entity.d.ts +0 -10
  143. package/.output/modules/settings/payments/payment.entity.js +0 -35
  144. package/.output/modules/store/cart/cart.entity.d.ts +0 -14
  145. package/.output/modules/store/cart/cart.entity.js +0 -39
  146. package/.output/modules/store/cart/cart.validator.d.ts +0 -13
  147. package/.output/modules/store/cart/cart.validator.js +0 -48
  148. package/.output/modules/store/orders/billing/billing.entity.js +0 -38
  149. package/.output/modules/store/orders/billing/billing.validator.js +0 -36
  150. package/.output/modules/store/orders/item/item.entity.js +0 -32
  151. package/.output/modules/store/orders/item/item.validator.js +0 -22
  152. package/.output/modules/store/orders/order.entity.d.ts +0 -15
  153. package/.output/modules/store/orders/order.entity.js +0 -47
  154. package/.output/modules/store/orders/order.validator.d.ts +0 -12
  155. package/.output/modules/store/orders/order.validator.js +0 -42
  156. package/.output/modules/store/orders/shipping/shipping.entity.js +0 -38
  157. package/.output/modules/store/orders/shipping/shipping.validator.js +0 -36
  158. package/.output/modules/store/orders/status/status.entity.d.ts +0 -13
  159. package/.output/modules/store/orders/status/status.entity.js +0 -39
@@ -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
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.CreateBillingValidator = void 0;
10
- const class_validator_1 = require("class-validator");
11
- class CreateBillingValidator {
12
- name;
13
- email;
14
- phone;
15
- address;
16
- code;
17
- }
18
- __decorate([
19
- (0, class_validator_1.IsString)(),
20
- (0, class_validator_1.IsNotEmpty)()
21
- ], CreateBillingValidator.prototype, "name", void 0);
22
- __decorate([
23
- (0, class_validator_1.IsEmail)()
24
- ], CreateBillingValidator.prototype, "email", void 0);
25
- __decorate([
26
- (0, class_validator_1.IsString)()
27
- ], CreateBillingValidator.prototype, "phone", void 0);
28
- __decorate([
29
- (0, class_validator_1.IsString)(),
30
- (0, class_validator_1.IsNotEmpty)()
31
- ], CreateBillingValidator.prototype, "address", void 0);
32
- __decorate([
33
- (0, class_validator_1.IsString)(),
34
- (0, class_validator_1.IsOptional)()
35
- ], CreateBillingValidator.prototype, "code", void 0);
36
- exports.CreateBillingValidator = CreateBillingValidator;
@@ -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
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.ItemSchema = exports.ItemEntity = void 0;
10
- const mongoose_1 = require("@nestjs/mongoose");
11
- const mongoose_2 = require("mongoose");
12
- const app_entity_1 = require("../../../../configs/app.entity");
13
- const product_entity_1 = require("../../../inventory/products/product.entity");
14
- let ItemEntity = class ItemEntity extends app_entity_1.AppEntity {
15
- quantity;
16
- price;
17
- product;
18
- };
19
- __decorate([
20
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number, default: 1 })
21
- ], ItemEntity.prototype, "quantity", void 0);
22
- __decorate([
23
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number, default: 0 })
24
- ], ItemEntity.prototype, "price", void 0);
25
- __decorate([
26
- (0, mongoose_1.Prop)({ type: mongoose_2.Types.ObjectId, ref: product_entity_1.ProductEntity.$index, required: true })
27
- ], ItemEntity.prototype, "product", void 0);
28
- ItemEntity = __decorate([
29
- (0, mongoose_1.Schema)({ timestamps: true })
30
- ], ItemEntity);
31
- exports.ItemEntity = ItemEntity;
32
- exports.ItemSchema = mongoose_1.SchemaFactory.createForClass(ItemEntity);
@@ -1,22 +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
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.CreateItemValidator = void 0;
10
- const class_validator_1 = require("class-validator");
11
- class CreateItemValidator {
12
- quantity = 1;
13
- product;
14
- }
15
- __decorate([
16
- (0, class_validator_1.IsNumber)(),
17
- (0, class_validator_1.IsNotEmpty)()
18
- ], CreateItemValidator.prototype, "quantity", void 0);
19
- __decorate([
20
- (0, class_validator_1.IsMongoId)()
21
- ], CreateItemValidator.prototype, "product", void 0);
22
- exports.CreateItemValidator = CreateItemValidator;
@@ -1,15 +0,0 @@
1
- import { AppEntity } from '../../../configs/app.entity';
2
- import { PaymentEntity } from '../../settings/payments/payment.entity';
3
- import { BillingEntity } from './billing/billing.entity';
4
- import { ItemEntity } from './item/item.entity';
5
- import { ShippingEntity } from './shipping/shipping.entity';
6
- import { StatusEntity } from './status/status.entity';
7
- export declare class OrderEntity extends AppEntity {
8
- static readonly $index = "store_orders";
9
- number: string;
10
- status: StatusEntity[];
11
- items: ItemEntity[];
12
- billing: BillingEntity;
13
- shipping: ShippingEntity;
14
- payment: PaymentEntity;
15
- }
@@ -1,47 +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
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.OrderEntity = void 0;
10
- const mongoose_1 = require("@nestjs/mongoose");
11
- const mongoose_2 = require("mongoose");
12
- const app_entity_1 = require("../../../configs/app.entity");
13
- const payment_entity_1 = require("../../settings/payments/payment.entity");
14
- const billing_entity_1 = require("./billing/billing.entity");
15
- const item_entity_1 = require("./item/item.entity");
16
- const shipping_entity_1 = require("./shipping/shipping.entity");
17
- let OrderEntity = class OrderEntity extends app_entity_1.AppEntity {
18
- static $index = 'store_orders';
19
- number;
20
- status = [];
21
- items = [];
22
- billing;
23
- shipping;
24
- payment;
25
- };
26
- __decorate([
27
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true })
28
- ], OrderEntity.prototype, "number", void 0);
29
- __decorate([
30
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Array, default: [] })
31
- ], OrderEntity.prototype, "status", void 0);
32
- __decorate([
33
- (0, mongoose_1.Prop)({ type: [item_entity_1.ItemSchema], default: [] })
34
- ], OrderEntity.prototype, "items", void 0);
35
- __decorate([
36
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: () => billing_entity_1.BillingEntity })
37
- ], OrderEntity.prototype, "billing", void 0);
38
- __decorate([
39
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: () => shipping_entity_1.ShippingEntity })
40
- ], OrderEntity.prototype, "shipping", void 0);
41
- __decorate([
42
- (0, mongoose_1.Prop)({ type: mongoose_2.Types.ObjectId, ref: payment_entity_1.PaymentEntity.$index })
43
- ], OrderEntity.prototype, "payment", void 0);
44
- OrderEntity = __decorate([
45
- (0, mongoose_1.Schema)({ timestamps: true })
46
- ], OrderEntity);
47
- exports.OrderEntity = OrderEntity;
@@ -1,12 +0,0 @@
1
- import { PaymentType } from '../../settings/payments/payment.entity';
2
- import { CreateBillingValidator } from './billing/billing.validator';
3
- import { CreateItemValidator } from './item/item.validator';
4
- import { CreateShippingValidator } from './shipping/shipping.validator';
5
- export declare class CreateOrderValidator {
6
- items: CreateItemValidator[];
7
- billing: CreateBillingValidator;
8
- shipping: CreateShippingValidator;
9
- payment: PaymentType;
10
- }
11
- export declare class UpdateOrderValidator {
12
- }
@@ -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
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.UpdateOrderValidator = exports.CreateOrderValidator = void 0;
10
- const class_transformer_1 = require("class-transformer");
11
- const class_validator_1 = require("class-validator");
12
- const payment_entity_1 = require("../../settings/payments/payment.entity");
13
- const billing_validator_1 = require("./billing/billing.validator");
14
- const item_validator_1 = require("./item/item.validator");
15
- const shipping_validator_1 = require("./shipping/shipping.validator");
16
- class CreateOrderValidator {
17
- items = [];
18
- billing;
19
- shipping;
20
- payment;
21
- }
22
- __decorate([
23
- (0, class_validator_1.ArrayNotEmpty)(),
24
- (0, class_validator_1.ValidateNested)({ each: true }),
25
- (0, class_transformer_1.Type)(() => item_validator_1.CreateItemValidator)
26
- ], CreateOrderValidator.prototype, "items", void 0);
27
- __decorate([
28
- (0, class_validator_1.ValidateNested)(),
29
- (0, class_transformer_1.Type)(() => billing_validator_1.CreateBillingValidator)
30
- ], CreateOrderValidator.prototype, "billing", void 0);
31
- __decorate([
32
- (0, class_validator_1.ValidateNested)(),
33
- (0, class_transformer_1.Type)(() => shipping_validator_1.CreateShippingValidator)
34
- ], CreateOrderValidator.prototype, "shipping", void 0);
35
- __decorate([
36
- (0, class_validator_1.ValidateNested)(),
37
- (0, class_validator_1.IsEnum)(payment_entity_1.PaymentType)
38
- ], CreateOrderValidator.prototype, "payment", void 0);
39
- exports.CreateOrderValidator = CreateOrderValidator;
40
- class UpdateOrderValidator {
41
- }
42
- exports.UpdateOrderValidator = UpdateOrderValidator;
@@ -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
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.ShippingEntity = void 0;
10
- const mongoose_1 = require("@nestjs/mongoose");
11
- const schema_decorator_1 = require("@nestjs/mongoose/dist/decorators/schema.decorator");
12
- const mongoose_2 = require("mongoose");
13
- let ShippingEntity = class ShippingEntity {
14
- name;
15
- email;
16
- phone;
17
- address;
18
- code;
19
- };
20
- __decorate([
21
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true })
22
- ], ShippingEntity.prototype, "name", void 0);
23
- __decorate([
24
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String })
25
- ], ShippingEntity.prototype, "email", void 0);
26
- __decorate([
27
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String })
28
- ], ShippingEntity.prototype, "phone", void 0);
29
- __decorate([
30
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true })
31
- ], ShippingEntity.prototype, "address", void 0);
32
- __decorate([
33
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true })
34
- ], ShippingEntity.prototype, "code", void 0);
35
- ShippingEntity = __decorate([
36
- (0, schema_decorator_1.Schema)({ timestamps: true })
37
- ], ShippingEntity);
38
- exports.ShippingEntity = ShippingEntity;
@@ -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
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.CreateShippingValidator = void 0;
10
- const class_validator_1 = require("class-validator");
11
- class CreateShippingValidator {
12
- name;
13
- email;
14
- phone;
15
- address;
16
- code;
17
- }
18
- __decorate([
19
- (0, class_validator_1.IsString)(),
20
- (0, class_validator_1.IsNotEmpty)()
21
- ], CreateShippingValidator.prototype, "name", void 0);
22
- __decorate([
23
- (0, class_validator_1.IsEmail)()
24
- ], CreateShippingValidator.prototype, "email", void 0);
25
- __decorate([
26
- (0, class_validator_1.IsString)()
27
- ], CreateShippingValidator.prototype, "phone", void 0);
28
- __decorate([
29
- (0, class_validator_1.IsString)(),
30
- (0, class_validator_1.IsNotEmpty)()
31
- ], CreateShippingValidator.prototype, "address", void 0);
32
- __decorate([
33
- (0, class_validator_1.IsString)(),
34
- (0, class_validator_1.IsOptional)()
35
- ], CreateShippingValidator.prototype, "code", void 0);
36
- exports.CreateShippingValidator = CreateShippingValidator;
@@ -1,13 +0,0 @@
1
- export declare enum StatusType {
2
- CREATED = "CREATED",
3
- APPROVED = "APPROVED",
4
- ON_HOLD = "ON_HOLD",
5
- IN_PROGRESS = "IN_PROGRESS",
6
- COMPLETED = "COMPLETED",
7
- CANCELED = "CANCELED"
8
- }
9
- export declare class StatusEntity {
10
- name: StatusType;
11
- user: string;
12
- readonly date: Date;
13
- }
@@ -1,39 +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
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.StatusEntity = exports.StatusType = void 0;
10
- const mongoose_1 = require("@nestjs/mongoose");
11
- const schema_decorator_1 = require("@nestjs/mongoose/dist/decorators/schema.decorator");
12
- const mongoose_2 = require("mongoose");
13
- var StatusType;
14
- (function (StatusType) {
15
- StatusType["CREATED"] = "CREATED";
16
- StatusType["APPROVED"] = "APPROVED";
17
- StatusType["ON_HOLD"] = "ON_HOLD";
18
- StatusType["IN_PROGRESS"] = "IN_PROGRESS";
19
- StatusType["COMPLETED"] = "COMPLETED";
20
- StatusType["CANCELED"] = "CANCELED";
21
- })(StatusType = exports.StatusType || (exports.StatusType = {}));
22
- let StatusEntity = class StatusEntity {
23
- name;
24
- user;
25
- date = new Date();
26
- };
27
- __decorate([
28
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, enum: StatusType, required: true })
29
- ], StatusEntity.prototype, "name", void 0);
30
- __decorate([
31
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String })
32
- ], StatusEntity.prototype, "user", void 0);
33
- __decorate([
34
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date, default: new Date() })
35
- ], StatusEntity.prototype, "date", void 0);
36
- StatusEntity = __decorate([
37
- (0, schema_decorator_1.Schema)({ timestamps: true })
38
- ], StatusEntity);
39
- exports.StatusEntity = StatusEntity;