@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.
- package/.output/abstract/abstract.document.d.ts +10 -0
- package/.output/abstract/abstract.document.js +13 -0
- package/.output/{configs/app.entity.d.ts → abstract/abstract.entity.d.ts} +3 -3
- package/.output/abstract/abstract.entity.js +54 -0
- package/.output/abstract/abstract.fixture.d.ts +4 -0
- package/.output/abstract/abstract.fixture.js +11 -0
- package/.output/abstract/abstract.validator.d.ts +18 -0
- package/.output/abstract/abstract.validator.js +73 -0
- package/.output/modules/assets/asset.entity.d.ts +2 -2
- package/.output/modules/assets/asset.entity.js +59 -33
- package/.output/modules/content/banners/banner.document.d.ts +6 -0
- package/.output/modules/content/banners/banner.document.js +30 -0
- package/.output/modules/content/banners/banner.entity.d.ts +7 -0
- package/.output/modules/content/banners/banner.entity.js +54 -0
- package/.output/modules/content/banners/banner.fixture.d.ts +5 -0
- package/.output/modules/content/banners/banner.fixture.js +39 -0
- package/.output/modules/content/banners/banner.validator.d.ts +8 -0
- package/.output/modules/content/banners/banner.validator.js +63 -0
- package/.output/modules/content/pages/page.document.d.ts +10 -0
- package/.output/modules/content/pages/page.document.js +32 -0
- package/.output/modules/content/pages/page.entity.d.ts +11 -0
- package/.output/modules/content/pages/page.entity.js +69 -0
- package/.output/modules/content/pages/page.fixture.d.ts +5 -0
- package/.output/modules/content/pages/page.fixture.js +39 -0
- package/.output/modules/content/pages/page.types.d.ts +8 -0
- package/.output/modules/content/pages/page.types.js +13 -0
- package/.output/modules/content/pages/page.validator.d.ts +11 -0
- package/.output/modules/content/pages/page.validator.js +73 -0
- package/.output/modules/insight/validators/order.validator.d.ts +4 -0
- package/.output/modules/insight/validators/order.validator.js +27 -0
- package/.output/modules/inventory/brands/brand.document.d.ts +5 -0
- package/.output/modules/inventory/brands/brand.document.js +30 -0
- package/.output/modules/inventory/brands/brand.entity.d.ts +2 -2
- package/.output/modules/inventory/brands/brand.entity.js +40 -17
- package/.output/modules/inventory/brands/brand.validator.js +34 -25
- package/.output/modules/inventory/categories/category.document.d.ts +6 -0
- package/.output/modules/inventory/categories/category.document.js +31 -0
- package/.output/modules/inventory/categories/category.entity.d.ts +5 -2
- package/.output/modules/inventory/categories/category.entity.js +51 -17
- package/.output/modules/inventory/categories/category.fixture.d.ts +5 -0
- package/.output/modules/inventory/categories/category.fixture.js +38 -0
- package/.output/modules/inventory/categories/category.validator.d.ts +2 -0
- package/.output/modules/inventory/categories/category.validator.js +46 -25
- package/.output/modules/inventory/products/entities/code.entity.d.ts +5 -0
- package/.output/modules/inventory/products/entities/code.entity.js +53 -0
- package/.output/modules/inventory/products/entities/dimension.entity.d.ts +6 -0
- package/.output/modules/inventory/products/entities/dimension.entity.js +57 -0
- package/.output/modules/inventory/products/entities/price.entity.d.ts +4 -0
- package/.output/modules/inventory/products/entities/price.entity.js +49 -0
- package/.output/modules/inventory/products/entities/seo.entity.d.ts +5 -0
- package/.output/modules/inventory/products/entities/seo.entity.js +53 -0
- package/.output/modules/inventory/products/product.document.d.ts +24 -0
- package/.output/modules/inventory/products/product.document.js +33 -0
- package/.output/modules/inventory/products/product.entity.d.ts +13 -3
- package/.output/modules/inventory/products/product.entity.js +91 -36
- package/.output/modules/inventory/products/product.fixture.d.ts +5 -0
- package/.output/modules/inventory/products/product.fixture.js +54 -0
- package/.output/modules/inventory/products/product.validator.d.ts +15 -11
- package/.output/modules/inventory/products/product.validator.js +107 -65
- package/.output/modules/inventory/products/validators/code.validator.d.ts +5 -0
- package/.output/modules/inventory/products/validators/code.validator.js +37 -0
- package/.output/modules/inventory/products/validators/dimension.validator.d.ts +6 -0
- package/.output/modules/inventory/products/validators/dimension.validator.js +43 -0
- package/.output/modules/inventory/products/validators/price.validator.d.ts +4 -0
- package/.output/modules/inventory/products/validators/price.validator.js +30 -0
- package/.output/modules/inventory/products/validators/seo.validator.d.ts +5 -0
- package/.output/modules/inventory/products/validators/seo.validator.js +37 -0
- package/.output/modules/inventory/properties/property.entity.d.ts +7 -0
- package/.output/modules/inventory/properties/property.entity.js +55 -0
- package/.output/modules/inventory/properties/property.validator.d.ts +12 -0
- package/.output/modules/inventory/properties/property.validator.js +51 -0
- package/.output/modules/sales/clients/client.entity.d.ts +12 -0
- package/.output/modules/sales/clients/client.entity.js +73 -0
- package/.output/modules/sales/clients/client.validator.d.ts +12 -0
- package/.output/modules/sales/clients/client.validator.js +67 -0
- package/.output/modules/{store/orders/billing/billing.validator.d.ts → sales/orders/billing/billing.document.d.ts} +4 -4
- package/.output/modules/sales/orders/billing/billing.document.js +9 -0
- package/.output/modules/{store → sales}/orders/billing/billing.entity.d.ts +0 -0
- package/.output/modules/sales/orders/billing/billing.entity.js +44 -0
- package/.output/modules/sales/orders/billing/billing.validator.d.ts +7 -0
- package/.output/modules/sales/orders/billing/billing.validator.js +40 -0
- package/.output/modules/sales/orders/item/item.document.d.ts +6 -0
- package/.output/modules/sales/orders/item/item.document.js +9 -0
- package/.output/modules/sales/orders/item/item.entity.d.ts +7 -0
- package/.output/modules/sales/orders/item/item.entity.js +54 -0
- package/.output/modules/{store/orders/item/item.entity.d.ts → sales/orders/item/item.schema.d.ts} +3 -9
- package/.output/modules/sales/orders/item/item.schema.js +6 -0
- package/.output/modules/{store → sales}/orders/item/item.validator.d.ts +0 -0
- package/.output/modules/sales/orders/item/item.validator.js +29 -0
- package/.output/modules/sales/orders/order.entity.d.ts +19 -0
- package/.output/modules/sales/orders/order.entity.js +82 -0
- package/.output/modules/sales/orders/order.validator.d.ts +18 -0
- package/.output/modules/sales/orders/order.validator.js +75 -0
- package/.output/modules/sales/orders/payment/payment.entity.d.ts +4 -0
- package/.output/modules/sales/orders/payment/payment.entity.js +28 -0
- package/.output/modules/sales/orders/payment/payment.schema.d.ts +27 -0
- package/.output/modules/sales/orders/payment/payment.schema.js +6 -0
- package/.output/modules/sales/orders/payment/payment.validator.d.ts +6 -0
- package/.output/modules/sales/orders/payment/payment.validator.js +10 -0
- package/.output/modules/{store/orders/shipping/shipping.validator.d.ts → sales/orders/shipping/shipping.document.d.ts} +4 -4
- package/.output/modules/sales/orders/shipping/shipping.document.js +9 -0
- package/.output/modules/{store → sales}/orders/shipping/shipping.entity.d.ts +0 -0
- package/.output/modules/sales/orders/shipping/shipping.entity.js +44 -0
- package/.output/modules/sales/orders/shipping/shipping.validator.d.ts +7 -0
- package/.output/modules/sales/orders/shipping/shipping.validator.js +40 -0
- package/.output/modules/sales/orders/status/status.document.d.ts +5 -0
- package/.output/modules/sales/orders/status/status.document.js +9 -0
- package/.output/modules/sales/orders/status/status.entity.d.ts +6 -0
- package/.output/modules/sales/orders/status/status.entity.js +37 -0
- package/.output/modules/sales/orders/status/status.validator.d.ts +8 -0
- package/.output/modules/sales/orders/status/status.validator.js +12 -0
- package/.output/modules/search/search.validator.d.ts +6 -0
- package/.output/modules/search/search.validator.js +49 -0
- package/.output/modules/{auth → setting}/connections/connection.validator.d.ts +0 -1
- package/.output/modules/setting/connections/connection.validator.js +37 -0
- package/.output/modules/setting/layout/layout.document.d.ts +5 -0
- package/.output/modules/setting/layout/layout.document.js +29 -0
- package/.output/modules/setting/layout/layout.entity.d.ts +6 -0
- package/.output/modules/setting/layout/layout.entity.js +46 -0
- package/.output/modules/{auth → setting}/members/member.validator.d.ts +0 -1
- package/.output/modules/{auth → setting}/members/member.validator.js +0 -1
- package/.output/modules/setting/organization/organization.document.d.ts +15 -0
- package/.output/modules/setting/organization/organization.document.js +31 -0
- package/.output/modules/setting/organization/organization.entity.d.ts +4 -0
- package/.output/modules/setting/organization/organization.entity.js +28 -0
- package/.output/modules/setting/organization/organization.types.d.ts +22 -0
- package/.output/modules/setting/organization/organization.types.js +102 -0
- package/.output/modules/setting/organization/organization.validator.d.ts +17 -0
- package/.output/modules/setting/organization/organization.validator.js +83 -0
- package/.output/modules/setting/theme/theme.entity.d.ts +6 -0
- package/.output/modules/setting/theme/theme.entity.js +46 -0
- package/.output/modules/users/user.validator.d.ts +10 -0
- package/.output/modules/users/user.validator.js +50 -0
- package/.output/types.d.ts +23 -0
- package/.output/types.js +2 -0
- package/package.json +21 -9
- package/.output/configs/app.entity.js +0 -28
- package/.output/main.d.ts +0 -0
- package/.output/modules/auth/connections/connection.validator.js +0 -29
- package/.output/modules/auth/organizations/organization.validator.d.ts +0 -6
- package/.output/modules/auth/organizations/organization.validator.js +0 -27
- package/.output/modules/settings/payments/payment.entity.d.ts +0 -10
- package/.output/modules/settings/payments/payment.entity.js +0 -35
- package/.output/modules/store/cart/cart.entity.d.ts +0 -14
- package/.output/modules/store/cart/cart.entity.js +0 -39
- package/.output/modules/store/cart/cart.validator.d.ts +0 -13
- package/.output/modules/store/cart/cart.validator.js +0 -48
- package/.output/modules/store/orders/billing/billing.entity.js +0 -38
- package/.output/modules/store/orders/billing/billing.validator.js +0 -36
- package/.output/modules/store/orders/item/item.entity.js +0 -32
- package/.output/modules/store/orders/item/item.validator.js +0 -22
- package/.output/modules/store/orders/order.entity.d.ts +0 -15
- package/.output/modules/store/orders/order.entity.js +0 -47
- package/.output/modules/store/orders/order.validator.d.ts +0 -12
- package/.output/modules/store/orders/order.validator.js +0 -42
- package/.output/modules/store/orders/shipping/shipping.entity.js +0 -38
- package/.output/modules/store/orders/shipping/shipping.validator.js +0 -36
- package/.output/modules/store/orders/status/status.entity.d.ts +0 -13
- package/.output/modules/store/orders/status/status.entity.js +0 -39
|
@@ -0,0 +1,83 @@
|
|
|
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.UpdateOrganizationValidator = exports.CreateOrganizationValidator = exports.OrganizationMetadataValidator = void 0;
|
|
13
|
+
var class_transformer_1 = require("class-transformer");
|
|
14
|
+
var class_validator_1 = require("class-validator");
|
|
15
|
+
var organization_types_1 = require("./organization.types");
|
|
16
|
+
var OrganizationMetadataValidator = (function () {
|
|
17
|
+
function OrganizationMetadataValidator() {
|
|
18
|
+
}
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsOptional)(),
|
|
21
|
+
(0, class_validator_1.ValidateNested)(),
|
|
22
|
+
(0, class_transformer_1.Type)(function () { return organization_types_1.OrganizationMetadataInformation; }),
|
|
23
|
+
__metadata("design:type", organization_types_1.OrganizationMetadataInformation)
|
|
24
|
+
], OrganizationMetadataValidator.prototype, "information", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsOptional)(),
|
|
27
|
+
(0, class_validator_1.ValidateNested)(),
|
|
28
|
+
(0, class_transformer_1.Type)(function () { return organization_types_1.OrganizationMetadataLocalization; }),
|
|
29
|
+
__metadata("design:type", organization_types_1.OrganizationMetadataLocalization)
|
|
30
|
+
], OrganizationMetadataValidator.prototype, "localization", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsOptional)(),
|
|
33
|
+
(0, class_validator_1.ValidateNested)(),
|
|
34
|
+
(0, class_transformer_1.Type)(function () { return organization_types_1.OrganizationMetadataAddress; }),
|
|
35
|
+
__metadata("design:type", organization_types_1.OrganizationMetadataAddress)
|
|
36
|
+
], OrganizationMetadataValidator.prototype, "address", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsOptional)(),
|
|
39
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
40
|
+
(0, class_transformer_1.Type)(function () { return organization_types_1.OrganizationMetadataSocial; }),
|
|
41
|
+
__metadata("design:type", Array)
|
|
42
|
+
], OrganizationMetadataValidator.prototype, "social", void 0);
|
|
43
|
+
return OrganizationMetadataValidator;
|
|
44
|
+
}());
|
|
45
|
+
exports.OrganizationMetadataValidator = OrganizationMetadataValidator;
|
|
46
|
+
var CreateOrganizationValidator = (function () {
|
|
47
|
+
function CreateOrganizationValidator() {
|
|
48
|
+
}
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_validator_1.IsString)(),
|
|
51
|
+
(0, class_validator_1.Length)(3, 255),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], CreateOrganizationValidator.prototype, "name", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_validator_1.IsString)(),
|
|
56
|
+
(0, class_validator_1.IsEmail)(),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], CreateOrganizationValidator.prototype, "email", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, class_validator_1.IsString)(),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], CreateOrganizationValidator.prototype, "password", void 0);
|
|
63
|
+
return CreateOrganizationValidator;
|
|
64
|
+
}());
|
|
65
|
+
exports.CreateOrganizationValidator = CreateOrganizationValidator;
|
|
66
|
+
var UpdateOrganizationValidator = (function () {
|
|
67
|
+
function UpdateOrganizationValidator() {
|
|
68
|
+
}
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_validator_1.IsString)(),
|
|
71
|
+
(0, class_validator_1.IsOptional)(),
|
|
72
|
+
(0, class_validator_1.Length)(3, 255),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], UpdateOrganizationValidator.prototype, "display_name", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, class_validator_1.IsOptional)(),
|
|
77
|
+
(0, class_validator_1.ValidateNested)(),
|
|
78
|
+
(0, class_transformer_1.Type)(function () { return OrganizationMetadataValidator; }),
|
|
79
|
+
__metadata("design:type", OrganizationMetadataValidator)
|
|
80
|
+
], UpdateOrganizationValidator.prototype, "metadata", void 0);
|
|
81
|
+
return UpdateOrganizationValidator;
|
|
82
|
+
}());
|
|
83
|
+
exports.UpdateOrganizationValidator = UpdateOrganizationValidator;
|
|
@@ -0,0 +1,46 @@
|
|
|
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.ThemeEntity = void 0;
|
|
28
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
+
var mongoose_2 = require("mongoose");
|
|
30
|
+
var abstract_entity_1 = require("../../../abstract/abstract.entity");
|
|
31
|
+
var ThemeEntity = (function (_super) {
|
|
32
|
+
__extends(ThemeEntity, _super);
|
|
33
|
+
function ThemeEntity() {
|
|
34
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
35
|
+
}
|
|
36
|
+
ThemeEntity.$index = 'settings_theme';
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true, length: 128 }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], ThemeEntity.prototype, "path", void 0);
|
|
41
|
+
ThemeEntity = __decorate([
|
|
42
|
+
(0, mongoose_1.Schema)({ timestamps: true })
|
|
43
|
+
], ThemeEntity);
|
|
44
|
+
return ThemeEntity;
|
|
45
|
+
}(abstract_entity_1.AbstractEntity));
|
|
46
|
+
exports.ThemeEntity = ThemeEntity;
|
|
@@ -0,0 +1,50 @@
|
|
|
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.AddressValidator = void 0;
|
|
13
|
+
var class_validator_1 = require("class-validator");
|
|
14
|
+
var AddressValidator = (function () {
|
|
15
|
+
function AddressValidator() {
|
|
16
|
+
}
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], AddressValidator.prototype, "name", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsISO31661Alpha2)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], AddressValidator.prototype, "country", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], AddressValidator.prototype, "code", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], AddressValidator.prototype, "line1", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsString)(),
|
|
35
|
+
(0, class_validator_1.IsOptional)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], AddressValidator.prototype, "line2", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_validator_1.IsOptional)(),
|
|
40
|
+
(0, class_validator_1.IsString)(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], AddressValidator.prototype, "city", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_validator_1.IsString)(),
|
|
45
|
+
(0, class_validator_1.IsOptional)(),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], AddressValidator.prototype, "state", void 0);
|
|
48
|
+
return AddressValidator;
|
|
49
|
+
}());
|
|
50
|
+
exports.AddressValidator = AddressValidator;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { GetResponse, SearchHit, SearchRequest, SearchTotalHits } from '@elastic/elasticsearch/lib/api/types';
|
|
2
|
+
import { AppMetadata, User, UserMetadata } from 'auth0';
|
|
3
|
+
export declare type Document<D> = GetResponse<D>;
|
|
4
|
+
export declare type Search<D> = {
|
|
5
|
+
total: SearchTotalHits;
|
|
6
|
+
hits: SearchHit<D>[];
|
|
7
|
+
max_score?: number;
|
|
8
|
+
};
|
|
9
|
+
export declare type SearchQuery = Omit<SearchRequest, 'index' | 'filter_path'>;
|
|
10
|
+
export interface MetaAddress {
|
|
11
|
+
name: string;
|
|
12
|
+
country: string;
|
|
13
|
+
code: string;
|
|
14
|
+
line1: string;
|
|
15
|
+
line2?: string;
|
|
16
|
+
city: string;
|
|
17
|
+
state: string;
|
|
18
|
+
}
|
|
19
|
+
export interface UserMeta extends UserMetadata {
|
|
20
|
+
addresses?: MetaAddress[];
|
|
21
|
+
}
|
|
22
|
+
export declare type AppMeta = AppMetadata;
|
|
23
|
+
export declare type UserDocument = User<AppMeta, UserMeta>;
|
package/.output/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@merkaly/api",
|
|
3
|
-
"version": "0.2.2
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "NestJS Backend ApiRest Service",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"license": "UNLICENSED",
|
|
10
10
|
"author": "Randy Tellez Galan <kronhyx@gmail.com>",
|
|
11
|
-
"main": "
|
|
11
|
+
"main": "./src/main",
|
|
12
12
|
"types": "./.output/types.d.ts",
|
|
13
13
|
"files": [
|
|
14
14
|
".output"
|
|
@@ -17,25 +17,29 @@
|
|
|
17
17
|
"prebuild": "yarn run clean",
|
|
18
18
|
"build": "nest build",
|
|
19
19
|
"clean": "tsc -b --clean",
|
|
20
|
-
"console": "ts-node -r tsconfig-paths/register ./src/console.ts",
|
|
20
|
+
"console": "ts-node -r tsconfig-paths/register ./src/app.console.ts",
|
|
21
21
|
"dev": "yarn start --watch",
|
|
22
|
-
"lint": "eslint \"{src,
|
|
22
|
+
"lint": "eslint \"{src,test}/**/*.ts\" . ",
|
|
23
|
+
"migrate": "tsc --target es5 ./src/migrations/*.ts && migrate --config ./src/app.migration.ts",
|
|
23
24
|
"prepack": ".bin/package.sh",
|
|
24
25
|
"postpack": "yarn run clean",
|
|
25
26
|
"semantic-release": "yarn run build:package && semantic-release",
|
|
26
27
|
"start": "nest start",
|
|
27
|
-
"start:prod": "node
|
|
28
|
+
"start:prod": "node ./src/main.js",
|
|
28
29
|
"test": "jest",
|
|
29
30
|
"test:cov": "yarn test -- --coverage",
|
|
30
31
|
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
|
31
32
|
"test:watch": "yarn test -- --watch"
|
|
32
33
|
},
|
|
34
|
+
"lint-staged": {
|
|
35
|
+
"*.**": "yarn lint --cache --fix"
|
|
36
|
+
},
|
|
33
37
|
"dependencies": {
|
|
34
|
-
"@
|
|
38
|
+
"@elastic/elasticsearch": "^8.4.0",
|
|
35
39
|
"@types/auth0": "^2.35.2",
|
|
36
40
|
"class-transformer": "^0.5.1",
|
|
37
41
|
"class-validator": "^0.13.1",
|
|
38
|
-
"mongoose": "^6
|
|
42
|
+
"mongoose": "^6",
|
|
39
43
|
"reflect-metadata": "^0.1.13"
|
|
40
44
|
},
|
|
41
45
|
"devDependencies": {
|
|
@@ -46,14 +50,20 @@
|
|
|
46
50
|
"@nestjs/common": "^9.0.11",
|
|
47
51
|
"@nestjs/config": "^2.2.0",
|
|
48
52
|
"@nestjs/core": "^9.0.11",
|
|
53
|
+
"@nestjs/elasticsearch": "^9.0.0",
|
|
54
|
+
"@nestjs/event-emitter": "^1.3.1",
|
|
49
55
|
"@nestjs/jwt": "^9.0.0",
|
|
56
|
+
"@nestjs/mongoose": "^9.2.0",
|
|
50
57
|
"@nestjs/passport": "^9.0.0",
|
|
51
58
|
"@nestjs/platform-express": "^9.0.11",
|
|
59
|
+
"@nestjs/platform-socket.io": "^9.1.6",
|
|
52
60
|
"@nestjs/schematics": "^9.0.1",
|
|
53
61
|
"@nestjs/swagger": "^6.1.0",
|
|
54
62
|
"@nestjs/testing": "^9.0.11",
|
|
63
|
+
"@nestjs/websockets": "^9.1.6",
|
|
55
64
|
"@types/cache-manager": "^4.0.1",
|
|
56
65
|
"@types/express": "^4.17.12",
|
|
66
|
+
"@types/express-session": "^1.17.5",
|
|
57
67
|
"@types/jest": "^27.0.0",
|
|
58
68
|
"@types/multer": "^1.4.7",
|
|
59
69
|
"@types/node": "^18.0.0",
|
|
@@ -63,13 +73,16 @@
|
|
|
63
73
|
"@typescript-eslint/eslint-plugin": "4.33.0",
|
|
64
74
|
"@typescript-eslint/parser": "4.33.0",
|
|
65
75
|
"auth0": "^2.42.0",
|
|
66
|
-
"cache-manager": "^
|
|
76
|
+
"cache-manager": "^5.0.0",
|
|
67
77
|
"commitlint": "^17.0.1",
|
|
68
78
|
"eslint": "7.32.0",
|
|
69
79
|
"eslint-plugin-import": "^2.23.4",
|
|
70
80
|
"express": "^4.17.3",
|
|
81
|
+
"express-session": "^1.17.3",
|
|
71
82
|
"husky": "^8.0.1",
|
|
72
83
|
"jest": "27.5.1",
|
|
84
|
+
"lint-staged": "^13.0.3",
|
|
85
|
+
"migrate-mongoose": "^4.0.0",
|
|
73
86
|
"nestjs-console": "^8.0.0",
|
|
74
87
|
"passport": "^0.6.0",
|
|
75
88
|
"passport-jwt": "^4.0.0",
|
|
@@ -83,7 +96,6 @@
|
|
|
83
96
|
"ts-node": "^10.0.0",
|
|
84
97
|
"tsconfig-paths": "^4.0.0",
|
|
85
98
|
"typescript": "4.4.4",
|
|
86
|
-
"version": "^4.1.2",
|
|
87
99
|
"webpack": "^5"
|
|
88
100
|
},
|
|
89
101
|
"engines": {
|
|
@@ -1,28 +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.AppEntity = void 0;
|
|
10
|
-
const mongoose_1 = require("@nestjs/mongoose");
|
|
11
|
-
const mongoose_2 = require("mongoose");
|
|
12
|
-
class AppEntity extends mongoose_2.Document {
|
|
13
|
-
static $index;
|
|
14
|
-
_id = '';
|
|
15
|
-
createdAt = new Date();
|
|
16
|
-
updatedAt = null;
|
|
17
|
-
deletedAt = null;
|
|
18
|
-
}
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date, default: new Date() })
|
|
21
|
-
], AppEntity.prototype, "createdAt", void 0);
|
|
22
|
-
__decorate([
|
|
23
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date })
|
|
24
|
-
], AppEntity.prototype, "updatedAt", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date })
|
|
27
|
-
], AppEntity.prototype, "deletedAt", void 0);
|
|
28
|
-
exports.AppEntity = AppEntity;
|
package/.output/main.d.ts
DELETED
|
File without changes
|
|
@@ -1,29 +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.UpdateConnectionValidator = exports.CreateConnectionValidator = void 0;
|
|
10
|
-
const class_validator_1 = require("class-validator");
|
|
11
|
-
require("reflect-metadata");
|
|
12
|
-
class CreateConnectionValidator {
|
|
13
|
-
connection_id;
|
|
14
|
-
assign_membership_on_login;
|
|
15
|
-
}
|
|
16
|
-
__decorate([
|
|
17
|
-
(0, class_validator_1.IsString)()
|
|
18
|
-
], CreateConnectionValidator.prototype, "connection_id", void 0);
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, class_validator_1.IsBoolean)()
|
|
21
|
-
], CreateConnectionValidator.prototype, "assign_membership_on_login", void 0);
|
|
22
|
-
exports.CreateConnectionValidator = CreateConnectionValidator;
|
|
23
|
-
class UpdateConnectionValidator {
|
|
24
|
-
assign_membership_on_login;
|
|
25
|
-
}
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, class_validator_1.IsBoolean)()
|
|
28
|
-
], UpdateConnectionValidator.prototype, "assign_membership_on_login", void 0);
|
|
29
|
-
exports.UpdateConnectionValidator = UpdateConnectionValidator;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.CreateOrganizationValidator = void 0;
|
|
10
|
-
const class_validator_1 = require("class-validator");
|
|
11
|
-
class CreateOrganizationValidator {
|
|
12
|
-
name;
|
|
13
|
-
email;
|
|
14
|
-
password;
|
|
15
|
-
}
|
|
16
|
-
__decorate([
|
|
17
|
-
(0, class_validator_1.IsString)(),
|
|
18
|
-
(0, class_validator_1.Length)(3, 255)
|
|
19
|
-
], CreateOrganizationValidator.prototype, "name", void 0);
|
|
20
|
-
__decorate([
|
|
21
|
-
(0, class_validator_1.IsString)(),
|
|
22
|
-
(0, class_validator_1.IsEmail)()
|
|
23
|
-
], CreateOrganizationValidator.prototype, "email", void 0);
|
|
24
|
-
__decorate([
|
|
25
|
-
(0, class_validator_1.IsString)()
|
|
26
|
-
], CreateOrganizationValidator.prototype, "password", void 0);
|
|
27
|
-
exports.CreateOrganizationValidator = CreateOrganizationValidator;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AppEntity } from '../../../configs/app.entity';
|
|
2
|
-
export declare enum PaymentType {
|
|
3
|
-
COD = "CASH_ON_DELIVERY"
|
|
4
|
-
}
|
|
5
|
-
export declare class PaymentEntity extends AppEntity {
|
|
6
|
-
static readonly $index = "settings_payments";
|
|
7
|
-
name: PaymentType;
|
|
8
|
-
active: boolean;
|
|
9
|
-
description: string;
|
|
10
|
-
}
|
|
@@ -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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.PaymentEntity = exports.PaymentType = 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
|
-
var PaymentType;
|
|
14
|
-
(function (PaymentType) {
|
|
15
|
-
PaymentType["COD"] = "CASH_ON_DELIVERY";
|
|
16
|
-
})(PaymentType = exports.PaymentType || (exports.PaymentType = {}));
|
|
17
|
-
let PaymentEntity = class PaymentEntity extends app_entity_1.AppEntity {
|
|
18
|
-
static $index = 'settings_payments';
|
|
19
|
-
name;
|
|
20
|
-
active = true;
|
|
21
|
-
description;
|
|
22
|
-
};
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, enum: PaymentType, required: true, unique: true })
|
|
25
|
-
], PaymentEntity.prototype, "name", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Boolean, default: true })
|
|
28
|
-
], PaymentEntity.prototype, "active", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: String() })
|
|
31
|
-
], PaymentEntity.prototype, "description", void 0);
|
|
32
|
-
PaymentEntity = __decorate([
|
|
33
|
-
(0, mongoose_1.Schema)({ timestamps: true })
|
|
34
|
-
], PaymentEntity);
|
|
35
|
-
exports.PaymentEntity = PaymentEntity;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { AppEntity } from '../../../configs/app.entity';
|
|
2
|
-
import { ItemEntity } from '../orders/item/item.entity';
|
|
3
|
-
export declare enum CartStatus {
|
|
4
|
-
EMPTY = "EMPTY",
|
|
5
|
-
FILLED = "FILLED",
|
|
6
|
-
FINISHED = "FINISHED",
|
|
7
|
-
ABANDONED = "ABANDONED"
|
|
8
|
-
}
|
|
9
|
-
export declare class CartEntity extends AppEntity {
|
|
10
|
-
static readonly $index = "store_carts";
|
|
11
|
-
user: string;
|
|
12
|
-
status: CartStatus;
|
|
13
|
-
items: ItemEntity[];
|
|
14
|
-
}
|
|
@@ -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.CartEntity = exports.CartStatus = 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 item_entity_1 = require("../orders/item/item.entity");
|
|
14
|
-
var CartStatus;
|
|
15
|
-
(function (CartStatus) {
|
|
16
|
-
CartStatus["EMPTY"] = "EMPTY";
|
|
17
|
-
CartStatus["FILLED"] = "FILLED";
|
|
18
|
-
CartStatus["FINISHED"] = "FINISHED";
|
|
19
|
-
CartStatus["ABANDONED"] = "ABANDONED";
|
|
20
|
-
})(CartStatus = exports.CartStatus || (exports.CartStatus = {}));
|
|
21
|
-
let CartEntity = class CartEntity extends app_entity_1.AppEntity {
|
|
22
|
-
static $index = 'store_carts';
|
|
23
|
-
user;
|
|
24
|
-
status = CartStatus.EMPTY;
|
|
25
|
-
items = [];
|
|
26
|
-
};
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true })
|
|
29
|
-
], CartEntity.prototype, "user", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, enum: CartStatus, default: CartStatus.EMPTY })
|
|
32
|
-
], CartEntity.prototype, "status", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, mongoose_1.Prop)({ type: [item_entity_1.ItemSchema], default: [] })
|
|
35
|
-
], CartEntity.prototype, "items", void 0);
|
|
36
|
-
CartEntity = __decorate([
|
|
37
|
-
(0, mongoose_1.Schema)({ timestamps: true })
|
|
38
|
-
], CartEntity);
|
|
39
|
-
exports.CartEntity = CartEntity;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { PaymentType } from '../../settings/payments/payment.entity';
|
|
2
|
-
import { CreateBillingValidator } from '../orders/billing/billing.validator';
|
|
3
|
-
import { CreateShippingValidator } from '../orders/shipping/shipping.validator';
|
|
4
|
-
export declare class CheckoutCartValidator {
|
|
5
|
-
cart: string;
|
|
6
|
-
billing: CreateBillingValidator;
|
|
7
|
-
shipping: CreateShippingValidator;
|
|
8
|
-
payment: PaymentType;
|
|
9
|
-
}
|
|
10
|
-
export declare class AddItemValidator {
|
|
11
|
-
product: string;
|
|
12
|
-
quantity: number;
|
|
13
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.AddItemValidator = exports.CheckoutCartValidator = 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("../orders/billing/billing.validator");
|
|
14
|
-
const shipping_validator_1 = require("../orders/shipping/shipping.validator");
|
|
15
|
-
class CheckoutCartValidator {
|
|
16
|
-
cart;
|
|
17
|
-
billing;
|
|
18
|
-
shipping;
|
|
19
|
-
payment;
|
|
20
|
-
}
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, class_validator_1.IsMongoId)()
|
|
23
|
-
], CheckoutCartValidator.prototype, "cart", void 0);
|
|
24
|
-
__decorate([
|
|
25
|
-
(0, class_validator_1.ValidateNested)(),
|
|
26
|
-
(0, class_transformer_1.Type)(() => billing_validator_1.CreateBillingValidator)
|
|
27
|
-
], CheckoutCartValidator.prototype, "billing", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, class_validator_1.ValidateNested)(),
|
|
30
|
-
(0, class_transformer_1.Type)(() => shipping_validator_1.CreateShippingValidator)
|
|
31
|
-
], CheckoutCartValidator.prototype, "shipping", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, class_validator_1.ValidateNested)(),
|
|
34
|
-
(0, class_validator_1.IsEnum)(payment_entity_1.PaymentType)
|
|
35
|
-
], CheckoutCartValidator.prototype, "payment", void 0);
|
|
36
|
-
exports.CheckoutCartValidator = CheckoutCartValidator;
|
|
37
|
-
class AddItemValidator {
|
|
38
|
-
product;
|
|
39
|
-
quantity = 1;
|
|
40
|
-
}
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, class_validator_1.IsMongoId)()
|
|
43
|
-
], AddItemValidator.prototype, "product", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, class_validator_1.IsOptional)(),
|
|
46
|
-
(0, class_validator_1.Min)(1)
|
|
47
|
-
], AddItemValidator.prototype, "quantity", void 0);
|
|
48
|
-
exports.AddItemValidator = AddItemValidator;
|
|
@@ -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.BillingEntity = 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 BillingEntity = class BillingEntity {
|
|
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
|
-
], BillingEntity.prototype, "name", void 0);
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String })
|
|
25
|
-
], BillingEntity.prototype, "email", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String })
|
|
28
|
-
], BillingEntity.prototype, "phone", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true })
|
|
31
|
-
], BillingEntity.prototype, "address", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true })
|
|
34
|
-
], BillingEntity.prototype, "code", void 0);
|
|
35
|
-
BillingEntity = __decorate([
|
|
36
|
-
(0, schema_decorator_1.Schema)({ timestamps: true })
|
|
37
|
-
], BillingEntity);
|
|
38
|
-
exports.BillingEntity = BillingEntity;
|