@merkaly/api 0.2.5-4 → 0.2.5-6
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/.bin/deploy.sh +9 -0
- package/.bin/package.sh +12 -0
- package/.docker/Dockerfile +21 -0
- package/.dockerignore +12 -0
- package/.github/dependabot.yml +17 -0
- package/.github/semantic.yml +5 -0
- package/.github/workflows/pull_request.yml +35 -0
- package/.prettierrc +5 -0
- package/app.ts +11 -0
- package/authCertificate.pem +19 -0
- package/nest-cli.json +8 -0
- package/package.json +66 -78
- package/src/abstracts/abstarct.repository.ts +62 -0
- package/src/abstracts/abstract.controller.ts +18 -0
- package/src/abstracts/abstract.entity.ts +22 -0
- package/src/abstracts/abstract.router.ts +7 -0
- package/src/abstracts/abstract.validator.ts +61 -0
- package/src/app.config.ts +59 -0
- package/src/app.console.ts +24 -0
- package/src/app.guard.ts +39 -0
- package/src/app.module.ts +54 -0
- package/src/app.strategy.ts +21 -0
- package/src/commands/seed.command.ts +263 -0
- package/src/decorators/public.decorator.ts +5 -0
- package/src/decorators/user.decorator.ts +30 -0
- package/src/exceptions/missing-identity.exception.ts +11 -0
- package/src/interceptors/mongoose.interceptor.ts +63 -0
- package/src/main.ts +27 -0
- package/src/middlewares/router.middleware.ts +14 -0
- package/src/modules/asset/asset.module.ts +19 -0
- package/src/modules/asset/files/file.controller.ts +22 -0
- package/src/modules/asset/files/file.entity.ts +24 -0
- package/src/modules/asset/files/file.module.ts +21 -0
- package/src/modules/asset/files/file.repository.ts +44 -0
- package/src/modules/asset/files/file.schema.ts +8 -0
- package/src/modules/asset/files/file.service.ts +4 -0
- package/src/modules/auth/auth.controller.ts +57 -0
- package/src/modules/auth/auth.module.ts +20 -0
- package/src/modules/auth/organizations/organization.controller.ts +20 -0
- package/src/modules/auth/organizations/organization.entity.ts +22 -0
- package/src/modules/auth/organizations/organization.module.ts +21 -0
- package/src/modules/auth/organizations/organization.repository.ts +16 -0
- package/src/modules/auth/organizations/organization.schema.ts +8 -0
- package/src/modules/auth/users/user.controller.ts +23 -0
- package/src/modules/auth/users/user.entity.ts +25 -0
- package/src/modules/auth/users/user.module.ts +20 -0
- package/src/modules/auth/users/user.repository.ts +79 -0
- package/src/modules/auth/users/user.schema.ts +8 -0
- package/src/modules/auth/users/user.validator.ts +32 -0
- package/src/modules/command.module.ts +15 -0
- package/src/modules/global.module.ts +46 -0
- package/src/modules/inventory/brands/brand.controller.ts +44 -0
- package/src/modules/inventory/brands/brand.entity.ts +20 -0
- package/src/modules/inventory/brands/brand.module.ts +20 -0
- package/src/modules/inventory/brands/brand.repository.ts +40 -0
- package/src/modules/inventory/brands/brand.schema.ts +8 -0
- package/src/modules/inventory/brands/brand.validator.ts +31 -0
- package/src/modules/inventory/categories/category.controller.ts +42 -0
- package/src/modules/inventory/categories/category.entity.ts +15 -0
- package/src/modules/inventory/categories/category.module.ts +19 -0
- package/src/modules/inventory/categories/category.repository.ts +34 -0
- package/src/modules/inventory/categories/category.schema.ts +8 -0
- package/src/modules/inventory/categories/category.validator.ts +20 -0
- package/src/modules/inventory/complements/complement.controller.ts +41 -0
- package/src/modules/inventory/complements/complement.entity.ts +15 -0
- package/src/modules/inventory/complements/complement.module.ts +19 -0
- package/src/modules/inventory/complements/complement.repository.ts +37 -0
- package/src/modules/inventory/complements/complement.schema.ts +8 -0
- package/src/modules/inventory/complements/complement.validator.ts +28 -0
- package/src/modules/inventory/inventory.module.ts +23 -0
- package/src/modules/inventory/products/documents/attribute.document.ts +14 -0
- package/src/modules/inventory/products/documents/dimension.document.ts +16 -0
- package/src/modules/inventory/products/product.controller.ts +62 -0
- package/src/modules/inventory/products/product.entity.ts +46 -0
- package/src/modules/inventory/products/product.module.ts +19 -0
- package/src/modules/inventory/products/product.repository.ts +64 -0
- package/src/modules/inventory/products/product.schema.ts +19 -0
- package/src/modules/inventory/products/product.validator.ts +132 -0
- package/src/modules/inventory/products/validators/attributes.validator.ts +15 -0
- package/src/modules/inventory/products/validators/dimension.validator.ts +19 -0
- package/src/modules/sale/customers/customer.controller.ts +41 -0
- package/src/modules/sale/customers/customer.entity.ts +19 -0
- package/src/modules/sale/customers/customer.module.ts +18 -0
- package/src/modules/sale/customers/customer.repository.ts +30 -0
- package/src/modules/sale/customers/customer.schema.ts +8 -0
- package/src/modules/sale/customers/customer.validator.ts +43 -0
- package/src/modules/sale/orders/documents/address.document.ts +22 -0
- package/src/modules/sale/orders/documents/status.document.ts +17 -0
- package/src/modules/sale/orders/entities/item.entity.ts +24 -0
- package/src/modules/sale/orders/enums/order.status.ts +6 -0
- package/src/modules/sale/orders/order.controller.ts +65 -0
- package/src/modules/sale/orders/order.entity.ts +46 -0
- package/src/modules/sale/orders/order.module.ts +22 -0
- package/src/modules/sale/orders/order.repository.ts +122 -0
- package/src/modules/sale/orders/order.schema.ts +36 -0
- package/src/modules/sale/orders/order.validator.ts +44 -0
- package/src/modules/sale/orders/validators/address.validator.ts +50 -0
- package/src/modules/sale/orders/validators/billing.validator.ts +11 -0
- package/src/modules/sale/orders/validators/item.validator.ts +14 -0
- package/src/modules/sale/orders/validators/payment.validator.ts +44 -0
- package/src/modules/sale/orders/validators/shipping.validator.ts +14 -0
- package/src/modules/sale/payments/entities/status.entity.ts +17 -0
- package/src/modules/sale/payments/enums/billing.type.ts +6 -0
- package/src/modules/sale/payments/enums/payment.status.ts +7 -0
- package/src/modules/sale/payments/enums/shipping.type.ts +4 -0
- package/src/modules/sale/payments/payment.controller.ts +45 -0
- package/src/modules/sale/payments/payment.entity.ts +25 -0
- package/src/modules/sale/payments/payment.module.ts +20 -0
- package/src/modules/sale/payments/payment.repository.ts +57 -0
- package/src/modules/sale/payments/payment.schema.ts +14 -0
- package/src/modules/sale/payments/payment.validator.ts +32 -0
- package/src/modules/sale/sale.module.ts +20 -0
- package/src/services/auth0.service.ts +49 -0
- package/src/services/mongo.service.ts +52 -0
- package/test/auth/auth.spec.ts +20 -0
- package/test/main.ts +12 -0
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +21 -0
- package/tsconfig.package.json +22 -0
- package/.output/abstract/abstract.entity.d.ts +0 -9
- package/.output/abstract/abstract.exception.d.ts +0 -11
- package/.output/abstract/abstract.exception.js +0 -53
- package/.output/abstract/abstract.fixture.d.ts +0 -4
- package/.output/abstract/abstract.fixture.js +0 -11
- package/.output/abstract/abstract.validator.d.ts +0 -20
- package/.output/abstract/abstract.validator.js +0 -105
- package/.output/exceptions/missing-identity.exception.d.ts +0 -5
- package/.output/exceptions/missing-identity.exception.js +0 -30
- package/.output/exceptions/store-not-implemented.exception.d.ts +0 -5
- package/.output/exceptions/store-not-implemented.exception.js +0 -31
- package/.output/exceptions/store-not-recognized.exception.d.ts +0 -5
- package/.output/exceptions/store-not-recognized.exception.js +0 -30
- package/.output/modules/asset/files/file.entity.d.ts +0 -10
- package/.output/modules/auth/auth.types.d.ts +0 -3
- package/.output/modules/auth/auth.types.js +0 -7
- package/.output/modules/auth/users/user.validator.d.ts +0 -10
- package/.output/modules/auth/users/user.validator.js +0 -50
- package/.output/modules/config/organization/organization.entity.d.ts +0 -21
- package/.output/modules/config/organization/organization.types.d.ts +0 -23
- package/.output/modules/config/organization/organization.types.js +0 -107
- package/.output/modules/config/organization/organization.validator.d.ts +0 -18
- package/.output/modules/config/organization/organization.validator.js +0 -88
- package/.output/modules/insight/validators/order.validator.d.ts +0 -4
- package/.output/modules/insight/validators/order.validator.js +0 -27
- package/.output/modules/inventory/brands/brand.entity.d.ts +0 -9
- package/.output/modules/inventory/brands/brand.exception.d.ts +0 -5
- package/.output/modules/inventory/brands/brand.exception.js +0 -40
- package/.output/modules/inventory/brands/brand.validator.d.ts +0 -11
- package/.output/modules/inventory/brands/brand.validator.js +0 -75
- package/.output/modules/inventory/categories/category.entity.d.ts +0 -12
- package/.output/modules/inventory/categories/category.exception.d.ts +0 -5
- package/.output/modules/inventory/categories/category.exception.js +0 -40
- package/.output/modules/inventory/categories/category.fixture.d.ts +0 -5
- package/.output/modules/inventory/categories/category.fixture.js +0 -38
- package/.output/modules/inventory/categories/category.validator.d.ts +0 -13
- package/.output/modules/inventory/categories/category.validator.js +0 -88
- package/.output/modules/inventory/products/entities/code.entity.d.ts +0 -5
- package/.output/modules/inventory/products/entities/dimension.entity.d.ts +0 -6
- package/.output/modules/inventory/products/entities/seo.entity.d.ts +0 -5
- package/.output/modules/inventory/products/entities/variant.entity.d.ts +0 -10
- package/.output/modules/inventory/products/product.entity.d.ts +0 -26
- package/.output/modules/inventory/products/product.exception.d.ts +0 -5
- package/.output/modules/inventory/products/product.exception.js +0 -40
- package/.output/modules/inventory/products/product.fixture.d.ts +0 -5
- package/.output/modules/inventory/products/product.fixture.js +0 -39
- package/.output/modules/inventory/products/product.validator.d.ts +0 -38
- package/.output/modules/inventory/products/product.validator.js +0 -235
- package/.output/modules/inventory/products/schemas/variant.schema.d.ts +0 -27
- package/.output/modules/inventory/products/schemas/variant.schema.js +0 -6
- package/.output/modules/inventory/products/validators/code.validator.d.ts +0 -5
- package/.output/modules/inventory/products/validators/code.validator.js +0 -37
- package/.output/modules/inventory/products/validators/dimension.validator.d.ts +0 -6
- package/.output/modules/inventory/products/validators/dimension.validator.js +0 -43
- package/.output/modules/inventory/products/validators/seo.validator.d.ts +0 -5
- package/.output/modules/inventory/products/validators/seo.validator.js +0 -34
- package/.output/modules/inventory/products/validators/variant.validator.d.ts +0 -9
- package/.output/modules/inventory/products/validators/variant.validator.js +0 -39
- package/.output/modules/inventory/properties/property.entity.d.ts +0 -8
- package/.output/modules/inventory/properties/property.exception.d.ts +0 -5
- package/.output/modules/inventory/properties/property.exception.js +0 -40
- package/.output/modules/inventory/properties/property.types.d.ts +0 -6
- package/.output/modules/inventory/properties/property.types.js +0 -10
- package/.output/modules/inventory/properties/property.validator.d.ts +0 -12
- package/.output/modules/inventory/properties/property.validator.js +0 -79
- package/.output/modules/layout/pages/page.entity.d.ts +0 -8
- package/.output/modules/layout/pages/page.fixture.d.ts +0 -5
- package/.output/modules/layout/pages/page.fixture.js +0 -36
- package/.output/modules/layout/pages/page.types.d.ts +0 -20
- package/.output/modules/layout/pages/page.types.js +0 -2
- package/.output/modules/layout/pages/page.validator.d.ts +0 -8
- package/.output/modules/layout/pages/page.validator.js +0 -61
- package/.output/modules/sale/customers/customer.entity.d.ts +0 -12
- package/.output/modules/sale/customers/customer.exception.d.ts +0 -5
- package/.output/modules/sale/customers/customer.exception.js +0 -40
- package/.output/modules/sale/customers/customer.validator.d.ts +0 -18
- package/.output/modules/sale/customers/customer.validator.js +0 -107
- package/.output/modules/sale/orders/billing/billing.entity.d.ts +0 -10
- package/.output/modules/sale/orders/billing/billing.types.d.ts +0 -9
- package/.output/modules/sale/orders/billing/billing.types.js +0 -14
- package/.output/modules/sale/orders/billing/billing.validator.d.ts +0 -9
- package/.output/modules/sale/orders/billing/billing.validator.js +0 -42
- package/.output/modules/sale/orders/billing/entities/address.entity.d.ts +0 -10
- package/.output/modules/sale/orders/billing/entities/customer.entity.d.ts +0 -5
- package/.output/modules/sale/orders/billing/entities/status.entity.d.ts +0 -6
- package/.output/modules/sale/orders/billing/validators/address.validator.d.ts +0 -10
- package/.output/modules/sale/orders/billing/validators/address.validator.js +0 -56
- package/.output/modules/sale/orders/billing/validators/customer.validator.d.ts +0 -5
- package/.output/modules/sale/orders/billing/validators/customer.validator.js +0 -36
- package/.output/modules/sale/orders/customer/customer.entity.d.ts +0 -5
- package/.output/modules/sale/orders/customer/customer.validator.d.ts +0 -5
- package/.output/modules/sale/orders/customer/customer.validator.js +0 -36
- package/.output/modules/sale/orders/item/item.entity.d.ts +0 -9
- package/.output/modules/sale/orders/item/item.schema.d.ts +0 -27
- package/.output/modules/sale/orders/item/item.schema.js +0 -9
- package/.output/modules/sale/orders/item/item.validator.d.ts +0 -4
- package/.output/modules/sale/orders/item/item.validator.js +0 -29
- package/.output/modules/sale/orders/order.entity.d.ts +0 -21
- package/.output/modules/sale/orders/order.exception.d.ts +0 -13
- package/.output/modules/sale/orders/order.exception.js +0 -46
- package/.output/modules/sale/orders/order.validator.d.ts +0 -28
- package/.output/modules/sale/orders/order.validator.js +0 -140
- package/.output/modules/sale/orders/shipping/entities/address.entity.d.ts +0 -10
- package/.output/modules/sale/orders/shipping/entities/customer.entity.d.ts +0 -5
- package/.output/modules/sale/orders/shipping/entities/status.entity.d.ts +0 -6
- package/.output/modules/sale/orders/shipping/shipping.entity.d.ts +0 -11
- package/.output/modules/sale/orders/shipping/shipping.types.d.ts +0 -11
- package/.output/modules/sale/orders/shipping/shipping.types.js +0 -16
- package/.output/modules/sale/orders/shipping/shipping.validator.d.ts +0 -10
- package/.output/modules/sale/orders/shipping/shipping.validator.js +0 -48
- package/.output/modules/sale/orders/shipping/validators/address.validator.d.ts +0 -10
- package/.output/modules/sale/orders/shipping/validators/address.validator.js +0 -56
- package/.output/modules/sale/orders/shipping/validators/customer.validator.d.ts +0 -5
- package/.output/modules/sale/orders/shipping/validators/customer.validator.js +0 -36
- package/.output/modules/sale/orders/status/status.entity.d.ts +0 -6
- package/.output/modules/sale/orders/status/status.validator.d.ts +0 -8
- package/.output/modules/sale/orders/status/status.validator.js +0 -12
- package/.output/services/logger.service.d.ts +0 -11
- package/.output/services/logger.service.js +0 -50
- package/.output/types.d.ts +0 -18
- package/.output/types.js +0 -2
- package/LICENSE +0 -674
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.BrandException = void 0;
|
|
25
|
-
var common_1 = require("@nestjs/common");
|
|
26
|
-
var abstract_exception_1 = require("../../../abstract/abstract.exception");
|
|
27
|
-
var BrandException = (function (_super) {
|
|
28
|
-
__extends(BrandException, _super);
|
|
29
|
-
function BrandException() {
|
|
30
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
31
|
-
}
|
|
32
|
-
BrandException.prototype.handleError = function (exception) {
|
|
33
|
-
return exception;
|
|
34
|
-
};
|
|
35
|
-
BrandException = __decorate([
|
|
36
|
-
(0, common_1.Catch)()
|
|
37
|
-
], BrandException);
|
|
38
|
-
return BrandException;
|
|
39
|
-
}(abstract_exception_1.AbstractException));
|
|
40
|
-
exports.BrandException = BrandException;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AbstractValidator } from "../../../abstract/abstract.validator";
|
|
2
|
-
export declare class CreateBrandValidator extends AbstractValidator {
|
|
3
|
-
name: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
image: string;
|
|
6
|
-
}
|
|
7
|
-
export declare class UpdateBrandValidator extends AbstractValidator {
|
|
8
|
-
name?: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
image: string;
|
|
11
|
-
}
|
|
@@ -1,75 +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.UpdateBrandValidator = exports.CreateBrandValidator = void 0;
|
|
28
|
-
var class_validator_1 = require("class-validator");
|
|
29
|
-
var abstract_validator_1 = require("../../../abstract/abstract.validator");
|
|
30
|
-
var CreateBrandValidator = (function (_super) {
|
|
31
|
-
__extends(CreateBrandValidator, _super);
|
|
32
|
-
function CreateBrandValidator() {
|
|
33
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
34
|
-
}
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, class_validator_1.IsString)(),
|
|
37
|
-
(0, class_validator_1.Length)(2, 32),
|
|
38
|
-
__metadata("design:type", String)
|
|
39
|
-
], CreateBrandValidator.prototype, "name", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, class_validator_1.IsString)(),
|
|
42
|
-
(0, class_validator_1.IsOptional)(),
|
|
43
|
-
__metadata("design:type", String)
|
|
44
|
-
], CreateBrandValidator.prototype, "description", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, class_validator_1.IsMongoId)(),
|
|
47
|
-
__metadata("design:type", String)
|
|
48
|
-
], CreateBrandValidator.prototype, "image", void 0);
|
|
49
|
-
return CreateBrandValidator;
|
|
50
|
-
}(abstract_validator_1.AbstractValidator));
|
|
51
|
-
exports.CreateBrandValidator = CreateBrandValidator;
|
|
52
|
-
var UpdateBrandValidator = (function (_super) {
|
|
53
|
-
__extends(UpdateBrandValidator, _super);
|
|
54
|
-
function UpdateBrandValidator() {
|
|
55
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
56
|
-
}
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, class_validator_1.IsString)(),
|
|
59
|
-
(0, class_validator_1.Length)(2, 32),
|
|
60
|
-
(0, class_validator_1.IsOptional)(),
|
|
61
|
-
__metadata("design:type", String)
|
|
62
|
-
], UpdateBrandValidator.prototype, "name", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
(0, class_validator_1.IsString)(),
|
|
65
|
-
(0, class_validator_1.IsOptional)(),
|
|
66
|
-
__metadata("design:type", String)
|
|
67
|
-
], UpdateBrandValidator.prototype, "description", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
(0, class_validator_1.IsMongoId)(),
|
|
70
|
-
(0, class_validator_1.IsOptional)(),
|
|
71
|
-
__metadata("design:type", String)
|
|
72
|
-
], UpdateBrandValidator.prototype, "image", void 0);
|
|
73
|
-
return UpdateBrandValidator;
|
|
74
|
-
}(abstract_validator_1.AbstractValidator));
|
|
75
|
-
exports.UpdateBrandValidator = UpdateBrandValidator;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { AbstractEntity } from '../../../abstract/abstract.entity';
|
|
2
|
-
import { PropertyEntity } from '../properties/property.entity';
|
|
3
|
-
import { FileEntity } from '../../asset/files/file.entity';
|
|
4
|
-
export declare class CategoryEntity extends AbstractEntity {
|
|
5
|
-
static readonly $index = "inventory_categories";
|
|
6
|
-
name: string;
|
|
7
|
-
description: string;
|
|
8
|
-
icon: string;
|
|
9
|
-
properties: PropertyEntity[];
|
|
10
|
-
image: FileEntity;
|
|
11
|
-
readonly picture: string;
|
|
12
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.CategoryException = void 0;
|
|
25
|
-
var common_1 = require("@nestjs/common");
|
|
26
|
-
var abstract_exception_1 = require("../../../abstract/abstract.exception");
|
|
27
|
-
var CategoryException = (function (_super) {
|
|
28
|
-
__extends(CategoryException, _super);
|
|
29
|
-
function CategoryException() {
|
|
30
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
31
|
-
}
|
|
32
|
-
CategoryException.prototype.handleError = function (exception) {
|
|
33
|
-
return exception;
|
|
34
|
-
};
|
|
35
|
-
CategoryException = __decorate([
|
|
36
|
-
(0, common_1.Catch)()
|
|
37
|
-
], CategoryException);
|
|
38
|
-
return CategoryException;
|
|
39
|
-
}(abstract_exception_1.AbstractException));
|
|
40
|
-
exports.CategoryException = CategoryException;
|
|
@@ -1,38 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.CategoryFixture = void 0;
|
|
19
|
-
var abstract_fixture_1 = require("../../../abstract/abstract.fixture");
|
|
20
|
-
var category_entity_1 = require("./category.entity");
|
|
21
|
-
var CategoryFixture = (function (_super) {
|
|
22
|
-
__extends(CategoryFixture, _super);
|
|
23
|
-
function CategoryFixture() {
|
|
24
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
25
|
-
}
|
|
26
|
-
CategoryFixture.prototype.normal = function () {
|
|
27
|
-
var category = new category_entity_1.CategoryEntity({
|
|
28
|
-
_id: this.$faker.datatype.uuid(),
|
|
29
|
-
createdAt: this.$faker.date.past(1),
|
|
30
|
-
updatedAt: this.$faker.date.past(1),
|
|
31
|
-
});
|
|
32
|
-
category.name = this.$faker.vehicle.manufacturer();
|
|
33
|
-
category.description = this.$faker.lorem.sentence();
|
|
34
|
-
return category;
|
|
35
|
-
};
|
|
36
|
-
return CategoryFixture;
|
|
37
|
-
}(abstract_fixture_1.AbstractFixture));
|
|
38
|
-
exports.CategoryFixture = CategoryFixture;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AbstractValidator } from "../../../abstract/abstract.validator";
|
|
2
|
-
export declare class CreateCategoryValidator extends AbstractValidator {
|
|
3
|
-
name: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
icon: string;
|
|
6
|
-
image: string;
|
|
7
|
-
}
|
|
8
|
-
export declare class UpdateCategoryValidator extends AbstractValidator {
|
|
9
|
-
name: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
icon: string;
|
|
12
|
-
image: string;
|
|
13
|
-
}
|
|
@@ -1,88 +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.UpdateCategoryValidator = exports.CreateCategoryValidator = void 0;
|
|
28
|
-
var class_validator_1 = require("class-validator");
|
|
29
|
-
var abstract_validator_1 = require("../../../abstract/abstract.validator");
|
|
30
|
-
var CreateCategoryValidator = (function (_super) {
|
|
31
|
-
__extends(CreateCategoryValidator, _super);
|
|
32
|
-
function CreateCategoryValidator() {
|
|
33
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
34
|
-
_this.icon = 'tag';
|
|
35
|
-
return _this;
|
|
36
|
-
}
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, class_validator_1.IsString)(),
|
|
39
|
-
(0, class_validator_1.Length)(5, 32),
|
|
40
|
-
__metadata("design:type", String)
|
|
41
|
-
], CreateCategoryValidator.prototype, "name", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, class_validator_1.IsString)(),
|
|
44
|
-
(0, class_validator_1.IsOptional)(),
|
|
45
|
-
__metadata("design:type", String)
|
|
46
|
-
], CreateCategoryValidator.prototype, "description", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, class_validator_1.IsString)(),
|
|
49
|
-
(0, class_validator_1.IsOptional)(),
|
|
50
|
-
__metadata("design:type", Object)
|
|
51
|
-
], CreateCategoryValidator.prototype, "icon", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, class_validator_1.IsMongoId)(),
|
|
54
|
-
__metadata("design:type", String)
|
|
55
|
-
], CreateCategoryValidator.prototype, "image", void 0);
|
|
56
|
-
return CreateCategoryValidator;
|
|
57
|
-
}(abstract_validator_1.AbstractValidator));
|
|
58
|
-
exports.CreateCategoryValidator = CreateCategoryValidator;
|
|
59
|
-
var UpdateCategoryValidator = (function (_super) {
|
|
60
|
-
__extends(UpdateCategoryValidator, _super);
|
|
61
|
-
function UpdateCategoryValidator() {
|
|
62
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
63
|
-
_this.icon = 'tag';
|
|
64
|
-
return _this;
|
|
65
|
-
}
|
|
66
|
-
__decorate([
|
|
67
|
-
(0, class_validator_1.IsString)(),
|
|
68
|
-
(0, class_validator_1.IsOptional)(),
|
|
69
|
-
__metadata("design:type", String)
|
|
70
|
-
], UpdateCategoryValidator.prototype, "name", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
(0, class_validator_1.IsString)(),
|
|
73
|
-
(0, class_validator_1.IsOptional)(),
|
|
74
|
-
__metadata("design:type", String)
|
|
75
|
-
], UpdateCategoryValidator.prototype, "description", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
(0, class_validator_1.IsString)(),
|
|
78
|
-
(0, class_validator_1.IsOptional)(),
|
|
79
|
-
__metadata("design:type", Object)
|
|
80
|
-
], UpdateCategoryValidator.prototype, "icon", void 0);
|
|
81
|
-
__decorate([
|
|
82
|
-
(0, class_validator_1.IsMongoId)(),
|
|
83
|
-
(0, class_validator_1.IsOptional)(),
|
|
84
|
-
__metadata("design:type", String)
|
|
85
|
-
], UpdateCategoryValidator.prototype, "image", void 0);
|
|
86
|
-
return UpdateCategoryValidator;
|
|
87
|
-
}(abstract_validator_1.AbstractValidator));
|
|
88
|
-
exports.UpdateCategoryValidator = UpdateCategoryValidator;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { AbstractEntity } from '../../../abstract/abstract.entity';
|
|
2
|
-
import { FileEntity } from '../../asset/files/file.entity';
|
|
3
|
-
import { BrandEntity } from '../brands/brand.entity';
|
|
4
|
-
import { CategoryEntity } from '../categories/category.entity';
|
|
5
|
-
import { CodeEntity } from './entities/code.entity';
|
|
6
|
-
import { DimensionEntity } from './entities/dimension.entity';
|
|
7
|
-
import { SeoEntity } from './entities/seo.entity';
|
|
8
|
-
import { VariantEntity } from './entities/variant.entity';
|
|
9
|
-
export declare class ProductEntity extends AbstractEntity {
|
|
10
|
-
static readonly $index = "inventory_products";
|
|
11
|
-
name: string;
|
|
12
|
-
measurement: string;
|
|
13
|
-
active: boolean;
|
|
14
|
-
description: string;
|
|
15
|
-
hashtags: string[];
|
|
16
|
-
category?: CategoryEntity;
|
|
17
|
-
brand?: BrandEntity;
|
|
18
|
-
files: FileEntity[];
|
|
19
|
-
price: number;
|
|
20
|
-
code: CodeEntity;
|
|
21
|
-
dimension: DimensionEntity;
|
|
22
|
-
seo: SeoEntity;
|
|
23
|
-
stock: number;
|
|
24
|
-
variants: VariantEntity[];
|
|
25
|
-
readonly picture: string;
|
|
26
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.ProductException = void 0;
|
|
25
|
-
var common_1 = require("@nestjs/common");
|
|
26
|
-
var abstract_exception_1 = require("../../../abstract/abstract.exception");
|
|
27
|
-
var ProductException = (function (_super) {
|
|
28
|
-
__extends(ProductException, _super);
|
|
29
|
-
function ProductException() {
|
|
30
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
31
|
-
}
|
|
32
|
-
ProductException.prototype.handleError = function (exception) {
|
|
33
|
-
return exception;
|
|
34
|
-
};
|
|
35
|
-
ProductException = __decorate([
|
|
36
|
-
(0, common_1.Catch)()
|
|
37
|
-
], ProductException);
|
|
38
|
-
return ProductException;
|
|
39
|
-
}(abstract_exception_1.AbstractException));
|
|
40
|
-
exports.ProductException = ProductException;
|
|
@@ -1,39 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.ProductFixture = void 0;
|
|
19
|
-
var abstract_fixture_1 = require("../../../abstract/abstract.fixture");
|
|
20
|
-
var product_entity_1 = require("./product.entity");
|
|
21
|
-
var ProductFixture = (function (_super) {
|
|
22
|
-
__extends(ProductFixture, _super);
|
|
23
|
-
function ProductFixture() {
|
|
24
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
25
|
-
}
|
|
26
|
-
ProductFixture.prototype.normal = function () {
|
|
27
|
-
var product = new product_entity_1.ProductEntity({
|
|
28
|
-
_id: this.$faker.datatype.uuid(),
|
|
29
|
-
createdAt: this.$faker.date.past(1),
|
|
30
|
-
updatedAt: this.$faker.date.past(1),
|
|
31
|
-
});
|
|
32
|
-
product.name = this.$faker.vehicle.vehicle();
|
|
33
|
-
product.description = this.$faker.commerce.productDescription();
|
|
34
|
-
product.price = Number(this.$faker.commerce.price(1000, 10000, 2));
|
|
35
|
-
return product;
|
|
36
|
-
};
|
|
37
|
-
return ProductFixture;
|
|
38
|
-
}(abstract_fixture_1.AbstractFixture));
|
|
39
|
-
exports.ProductFixture = ProductFixture;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import 'reflect-metadata';
|
|
2
|
-
import { ProductCodeValidator } from './validators/code.validator';
|
|
3
|
-
import { ProductDimensionValidator } from './validators/dimension.validator';
|
|
4
|
-
import { ProductSeoValidator } from './validators/seo.validator';
|
|
5
|
-
import { AbstractValidator } from '../../../abstract/abstract.validator';
|
|
6
|
-
import { ProductVariantValidator } from "./validators/variant.validator";
|
|
7
|
-
import { ProductEntity } from "./product.entity";
|
|
8
|
-
export declare class CreateProductValidator extends AbstractValidator {
|
|
9
|
-
name: string;
|
|
10
|
-
description: string;
|
|
11
|
-
active: boolean;
|
|
12
|
-
category?: string;
|
|
13
|
-
brand?: string;
|
|
14
|
-
files: string[];
|
|
15
|
-
hashtags: string[];
|
|
16
|
-
price: number;
|
|
17
|
-
seo: ProductSeoValidator;
|
|
18
|
-
dimension: ProductDimensionValidator;
|
|
19
|
-
code: ProductCodeValidator;
|
|
20
|
-
stock: number | null;
|
|
21
|
-
variants?: ProductVariantValidator[];
|
|
22
|
-
}
|
|
23
|
-
export declare class UpdateProductValidator {
|
|
24
|
-
constructor(product?: ProductEntity);
|
|
25
|
-
name?: string;
|
|
26
|
-
description?: string;
|
|
27
|
-
active?: boolean;
|
|
28
|
-
category?: string;
|
|
29
|
-
brand?: string;
|
|
30
|
-
files?: string[];
|
|
31
|
-
hashtags?: string[];
|
|
32
|
-
price?: number;
|
|
33
|
-
seo: ProductSeoValidator;
|
|
34
|
-
dimension: ProductDimensionValidator;
|
|
35
|
-
code?: ProductCodeValidator;
|
|
36
|
-
stock?: number;
|
|
37
|
-
variants?: ProductVariantValidator[];
|
|
38
|
-
}
|