@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,36 +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.PageFixture = void 0;
|
|
19
|
-
var abstract_fixture_1 = require("../../../abstract/abstract.fixture");
|
|
20
|
-
var page_validator_1 = require("./page.validator");
|
|
21
|
-
var PageFixture = (function (_super) {
|
|
22
|
-
__extends(PageFixture, _super);
|
|
23
|
-
function PageFixture() {
|
|
24
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
25
|
-
}
|
|
26
|
-
PageFixture.prototype.normal = function () {
|
|
27
|
-
var page = new page_validator_1.CreatePageValidator();
|
|
28
|
-
page.title = this.$faker.random.words(6);
|
|
29
|
-
page.name = this.$faker.helpers.slugify(page.title);
|
|
30
|
-
page.description = this.$faker.lorem.words(45);
|
|
31
|
-
page.content = {};
|
|
32
|
-
return page;
|
|
33
|
-
};
|
|
34
|
-
return PageFixture;
|
|
35
|
-
}(abstract_fixture_1.AbstractFixture));
|
|
36
|
-
exports.PageFixture = PageFixture;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ProductEntity } from '../../inventory/products/product.entity';
|
|
2
|
-
import { BrandEntity } from '../../inventory/brands/brand.entity';
|
|
3
|
-
import { CategoryEntity } from '../../inventory/categories/category.entity';
|
|
4
|
-
export interface IndexPageContent {
|
|
5
|
-
hero: {
|
|
6
|
-
src: string;
|
|
7
|
-
}[];
|
|
8
|
-
banners: {
|
|
9
|
-
src: string;
|
|
10
|
-
}[];
|
|
11
|
-
products: ProductEntity[];
|
|
12
|
-
categories: CategoryEntity[];
|
|
13
|
-
brands: BrandEntity[];
|
|
14
|
-
promotions: ProductEntity[];
|
|
15
|
-
services: {
|
|
16
|
-
icon: string;
|
|
17
|
-
title: string;
|
|
18
|
-
description: string;
|
|
19
|
-
}[];
|
|
20
|
-
}
|
|
@@ -1,61 +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.UpdatePageValidator = exports.CreatePageValidator = void 0;
|
|
28
|
-
var class_validator_1 = require("class-validator");
|
|
29
|
-
var CreatePageValidator = (function () {
|
|
30
|
-
function CreatePageValidator() {
|
|
31
|
-
this.description = null;
|
|
32
|
-
}
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, class_validator_1.IsString)(),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], CreatePageValidator.prototype, "name", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, class_validator_1.IsString)(),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], CreatePageValidator.prototype, "title", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, class_validator_1.IsString)(),
|
|
43
|
-
(0, class_validator_1.IsOptional)(),
|
|
44
|
-
__metadata("design:type", String)
|
|
45
|
-
], CreatePageValidator.prototype, "description", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, class_validator_1.IsObject)(),
|
|
48
|
-
(0, class_validator_1.IsNotEmptyObject)(),
|
|
49
|
-
__metadata("design:type", Object)
|
|
50
|
-
], CreatePageValidator.prototype, "content", void 0);
|
|
51
|
-
return CreatePageValidator;
|
|
52
|
-
}());
|
|
53
|
-
exports.CreatePageValidator = CreatePageValidator;
|
|
54
|
-
var UpdatePageValidator = (function (_super) {
|
|
55
|
-
__extends(UpdatePageValidator, _super);
|
|
56
|
-
function UpdatePageValidator() {
|
|
57
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
58
|
-
}
|
|
59
|
-
return UpdatePageValidator;
|
|
60
|
-
}(CreatePageValidator));
|
|
61
|
-
exports.UpdatePageValidator = UpdatePageValidator;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { User } from 'auth0';
|
|
2
|
-
import { AbstractEntity } from '../../../abstract/abstract.entity';
|
|
3
|
-
import { MetaAddress } from '../../../types';
|
|
4
|
-
export declare class CustomerEntity extends AbstractEntity implements User {
|
|
5
|
-
static readonly $index = "sale_customers";
|
|
6
|
-
readonly name: string;
|
|
7
|
-
readonly email: string;
|
|
8
|
-
readonly phone?: string;
|
|
9
|
-
readonly identificationNumber: string;
|
|
10
|
-
readonly addresses: MetaAddress[];
|
|
11
|
-
users: 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.CustomerException = void 0;
|
|
25
|
-
var common_1 = require("@nestjs/common");
|
|
26
|
-
var abstract_exception_1 = require("../../../abstract/abstract.exception");
|
|
27
|
-
var CustomerException = (function (_super) {
|
|
28
|
-
__extends(CustomerException, _super);
|
|
29
|
-
function CustomerException() {
|
|
30
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
31
|
-
}
|
|
32
|
-
CustomerException.prototype.handleError = function (exception) {
|
|
33
|
-
return exception;
|
|
34
|
-
};
|
|
35
|
-
CustomerException = __decorate([
|
|
36
|
-
(0, common_1.Catch)()
|
|
37
|
-
], CustomerException);
|
|
38
|
-
return CustomerException;
|
|
39
|
-
}(abstract_exception_1.AbstractException));
|
|
40
|
-
exports.CustomerException = CustomerException;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { MetaAddress } from '../../../types';
|
|
2
|
-
import { AbstractValidator } from '../../../abstract/abstract.validator';
|
|
3
|
-
export declare class CreateClientValidator extends AbstractValidator {
|
|
4
|
-
name: string;
|
|
5
|
-
email: string;
|
|
6
|
-
phone?: string;
|
|
7
|
-
identificationNumber: string;
|
|
8
|
-
addresses: MetaAddress[];
|
|
9
|
-
}
|
|
10
|
-
export declare class UpdateClientValidator extends CreateClientValidator {
|
|
11
|
-
name: string;
|
|
12
|
-
email: string;
|
|
13
|
-
phone: string;
|
|
14
|
-
identificationNumber: string;
|
|
15
|
-
}
|
|
16
|
-
export declare class AddClientUsers {
|
|
17
|
-
ids: string[];
|
|
18
|
-
}
|
|
@@ -1,107 +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.AddClientUsers = exports.UpdateClientValidator = exports.CreateClientValidator = void 0;
|
|
28
|
-
var class_transformer_1 = require("class-transformer");
|
|
29
|
-
var class_validator_1 = require("class-validator");
|
|
30
|
-
var abstract_validator_1 = require("../../../abstract/abstract.validator");
|
|
31
|
-
var CreateClientValidator = (function (_super) {
|
|
32
|
-
__extends(CreateClientValidator, _super);
|
|
33
|
-
function CreateClientValidator() {
|
|
34
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
35
|
-
}
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, class_validator_1.IsString)(),
|
|
38
|
-
__metadata("design:type", String)
|
|
39
|
-
], CreateClientValidator.prototype, "name", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, class_validator_1.IsEmail)(),
|
|
42
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
|
43
|
-
var value = _a.value;
|
|
44
|
-
return String(value).toLowerCase();
|
|
45
|
-
}),
|
|
46
|
-
__metadata("design:type", String)
|
|
47
|
-
], CreateClientValidator.prototype, "email", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, class_validator_1.IsString)(),
|
|
50
|
-
(0, class_validator_1.IsOptional)(),
|
|
51
|
-
__metadata("design:type", String)
|
|
52
|
-
], CreateClientValidator.prototype, "phone", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
(0, class_validator_1.IsString)(),
|
|
55
|
-
__metadata("design:type", String)
|
|
56
|
-
], CreateClientValidator.prototype, "identificationNumber", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, class_validator_1.IsArray)(),
|
|
59
|
-
__metadata("design:type", Array)
|
|
60
|
-
], CreateClientValidator.prototype, "addresses", void 0);
|
|
61
|
-
return CreateClientValidator;
|
|
62
|
-
}(abstract_validator_1.AbstractValidator));
|
|
63
|
-
exports.CreateClientValidator = CreateClientValidator;
|
|
64
|
-
var UpdateClientValidator = (function (_super) {
|
|
65
|
-
__extends(UpdateClientValidator, _super);
|
|
66
|
-
function UpdateClientValidator() {
|
|
67
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
68
|
-
}
|
|
69
|
-
__decorate([
|
|
70
|
-
(0, class_validator_1.IsString)(),
|
|
71
|
-
(0, class_validator_1.IsOptional)(),
|
|
72
|
-
__metadata("design:type", String)
|
|
73
|
-
], UpdateClientValidator.prototype, "name", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
(0, class_validator_1.IsEmail)(),
|
|
76
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
|
77
|
-
var value = _a.value;
|
|
78
|
-
return String(value).toLowerCase();
|
|
79
|
-
}),
|
|
80
|
-
(0, class_validator_1.IsOptional)(),
|
|
81
|
-
__metadata("design:type", String)
|
|
82
|
-
], UpdateClientValidator.prototype, "email", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
(0, class_validator_1.IsPhoneNumber)(),
|
|
85
|
-
(0, class_validator_1.IsOptional)(),
|
|
86
|
-
__metadata("design:type", String)
|
|
87
|
-
], UpdateClientValidator.prototype, "phone", void 0);
|
|
88
|
-
__decorate([
|
|
89
|
-
(0, class_validator_1.IsString)(),
|
|
90
|
-
(0, class_validator_1.IsOptional)(),
|
|
91
|
-
__metadata("design:type", String)
|
|
92
|
-
], UpdateClientValidator.prototype, "identificationNumber", void 0);
|
|
93
|
-
return UpdateClientValidator;
|
|
94
|
-
}(CreateClientValidator));
|
|
95
|
-
exports.UpdateClientValidator = UpdateClientValidator;
|
|
96
|
-
var AddClientUsers = (function () {
|
|
97
|
-
function AddClientUsers() {
|
|
98
|
-
}
|
|
99
|
-
__decorate([
|
|
100
|
-
(0, class_validator_1.IsArray)(),
|
|
101
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
102
|
-
(0, class_validator_1.ArrayMinSize)(1),
|
|
103
|
-
__metadata("design:type", Array)
|
|
104
|
-
], AddClientUsers.prototype, "ids", void 0);
|
|
105
|
-
return AddClientUsers;
|
|
106
|
-
}());
|
|
107
|
-
exports.AddClientUsers = AddClientUsers;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BillingMethod } from "./billing.types";
|
|
2
|
-
import { BillingStatusEntity } from "./entities/status.entity";
|
|
3
|
-
import { BillingAddressEntity } from "./entities/address.entity";
|
|
4
|
-
import { BillingCustomerEntity } from "./entities/customer.entity";
|
|
5
|
-
export declare class BillingEntity extends Map {
|
|
6
|
-
address: BillingAddressEntity;
|
|
7
|
-
customer: BillingCustomerEntity;
|
|
8
|
-
method: BillingMethod;
|
|
9
|
-
status: BillingStatusEntity[];
|
|
10
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BillingStatus = exports.BillingMethod = void 0;
|
|
4
|
-
var BillingMethod;
|
|
5
|
-
(function (BillingMethod) {
|
|
6
|
-
BillingMethod["CASH"] = "CASH";
|
|
7
|
-
BillingMethod["CARD"] = "CARD";
|
|
8
|
-
BillingMethod["TRANSFER"] = "TRANSFER";
|
|
9
|
-
})(BillingMethod = exports.BillingMethod || (exports.BillingMethod = {}));
|
|
10
|
-
var BillingStatus;
|
|
11
|
-
(function (BillingStatus) {
|
|
12
|
-
BillingStatus["UNPAID"] = "UNPAID";
|
|
13
|
-
BillingStatus["PAID"] = "PAID";
|
|
14
|
-
})(BillingStatus = exports.BillingStatus || (exports.BillingStatus = {}));
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import 'reflect-metadata';
|
|
2
|
-
import { BillingMethod } from "./billing.types";
|
|
3
|
-
import { BillingCustomerValidator } from "./validators/customer.validator";
|
|
4
|
-
import { BillingAddressValidator } from "./validators/address.validator";
|
|
5
|
-
export declare class CreateBillingValidator {
|
|
6
|
-
customer: BillingCustomerValidator;
|
|
7
|
-
address: BillingAddressValidator;
|
|
8
|
-
method: BillingMethod;
|
|
9
|
-
}
|
|
@@ -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
|
-
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.CreateBillingValidator = void 0;
|
|
13
|
-
var class_transformer_1 = require("class-transformer");
|
|
14
|
-
var class_validator_1 = require("class-validator");
|
|
15
|
-
require("reflect-metadata");
|
|
16
|
-
var billing_types_1 = require("./billing.types");
|
|
17
|
-
var customer_validator_1 = require("./validators/customer.validator");
|
|
18
|
-
var address_validator_1 = require("./validators/address.validator");
|
|
19
|
-
var CreateBillingValidator = (function () {
|
|
20
|
-
function CreateBillingValidator() {
|
|
21
|
-
this.customer = new customer_validator_1.BillingCustomerValidator();
|
|
22
|
-
this.address = new address_validator_1.BillingAddressValidator();
|
|
23
|
-
}
|
|
24
|
-
__decorate([
|
|
25
|
-
(0, class_validator_1.ValidateNested)(),
|
|
26
|
-
(0, class_transformer_1.Type)(function () { return customer_validator_1.BillingCustomerValidator; }),
|
|
27
|
-
(0, class_validator_1.IsNotEmptyObject)(),
|
|
28
|
-
__metadata("design:type", Object)
|
|
29
|
-
], CreateBillingValidator.prototype, "customer", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, class_validator_1.ValidateNested)(),
|
|
32
|
-
(0, class_transformer_1.Type)(function () { return address_validator_1.BillingAddressValidator; }),
|
|
33
|
-
(0, class_validator_1.IsNotEmptyObject)(),
|
|
34
|
-
__metadata("design:type", Object)
|
|
35
|
-
], CreateBillingValidator.prototype, "address", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, class_validator_1.IsEnum)(billing_types_1.BillingMethod),
|
|
38
|
-
__metadata("design:type", String)
|
|
39
|
-
], CreateBillingValidator.prototype, "method", void 0);
|
|
40
|
-
return CreateBillingValidator;
|
|
41
|
-
}());
|
|
42
|
-
exports.CreateBillingValidator = CreateBillingValidator;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { MetaAddress } from "../../../../../types";
|
|
2
|
-
export declare class BillingAddressEntity extends Map implements MetaAddress {
|
|
3
|
-
country: string;
|
|
4
|
-
code: string;
|
|
5
|
-
street: string;
|
|
6
|
-
number: string;
|
|
7
|
-
complement: string;
|
|
8
|
-
city: string;
|
|
9
|
-
state: string;
|
|
10
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.BillingAddressValidator = void 0;
|
|
13
|
-
var class_validator_1 = require("class-validator");
|
|
14
|
-
var BillingAddressValidator = (function () {
|
|
15
|
-
function BillingAddressValidator() {
|
|
16
|
-
this.country = String();
|
|
17
|
-
this.code = String();
|
|
18
|
-
this.street = String();
|
|
19
|
-
this.number = String();
|
|
20
|
-
this.complement = undefined;
|
|
21
|
-
this.city = String();
|
|
22
|
-
this.state = String();
|
|
23
|
-
}
|
|
24
|
-
__decorate([
|
|
25
|
-
(0, class_validator_1.IsISO31661Alpha2)(),
|
|
26
|
-
__metadata("design:type", Object)
|
|
27
|
-
], BillingAddressValidator.prototype, "country", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, class_validator_1.IsString)(),
|
|
30
|
-
__metadata("design:type", Object)
|
|
31
|
-
], BillingAddressValidator.prototype, "code", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, class_validator_1.IsString)(),
|
|
34
|
-
__metadata("design:type", Object)
|
|
35
|
-
], BillingAddressValidator.prototype, "street", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, class_validator_1.IsString)(),
|
|
38
|
-
(0, class_validator_1.IsOptional)(),
|
|
39
|
-
__metadata("design:type", Object)
|
|
40
|
-
], BillingAddressValidator.prototype, "number", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, class_validator_1.IsString)(),
|
|
43
|
-
(0, class_validator_1.IsOptional)(),
|
|
44
|
-
__metadata("design:type", String)
|
|
45
|
-
], BillingAddressValidator.prototype, "complement", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, class_validator_1.IsString)(),
|
|
48
|
-
__metadata("design:type", Object)
|
|
49
|
-
], BillingAddressValidator.prototype, "city", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, class_validator_1.IsString)(),
|
|
52
|
-
__metadata("design:type", Object)
|
|
53
|
-
], BillingAddressValidator.prototype, "state", void 0);
|
|
54
|
-
return BillingAddressValidator;
|
|
55
|
-
}());
|
|
56
|
-
exports.BillingAddressValidator = BillingAddressValidator;
|
|
@@ -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
|
-
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.BillingCustomerValidator = void 0;
|
|
13
|
-
var class_validator_1 = require("class-validator");
|
|
14
|
-
var BillingCustomerValidator = (function () {
|
|
15
|
-
function BillingCustomerValidator() {
|
|
16
|
-
this.name = String();
|
|
17
|
-
this.email = String();
|
|
18
|
-
this.phone = undefined;
|
|
19
|
-
}
|
|
20
|
-
__decorate([
|
|
21
|
-
(0, class_validator_1.IsString)(),
|
|
22
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
23
|
-
__metadata("design:type", Object)
|
|
24
|
-
], BillingCustomerValidator.prototype, "name", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, class_validator_1.IsEmail)(),
|
|
27
|
-
__metadata("design:type", Object)
|
|
28
|
-
], BillingCustomerValidator.prototype, "email", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, class_validator_1.IsString)(),
|
|
31
|
-
(0, class_validator_1.IsOptional)(),
|
|
32
|
-
__metadata("design:type", String)
|
|
33
|
-
], BillingCustomerValidator.prototype, "phone", void 0);
|
|
34
|
-
return BillingCustomerValidator;
|
|
35
|
-
}());
|
|
36
|
-
exports.BillingCustomerValidator = BillingCustomerValidator;
|
|
@@ -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
|
-
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.CustomerValidator = void 0;
|
|
13
|
-
var class_validator_1 = require("class-validator");
|
|
14
|
-
var CustomerValidator = (function () {
|
|
15
|
-
function CustomerValidator() {
|
|
16
|
-
this.name = String();
|
|
17
|
-
this.email = String();
|
|
18
|
-
this.phone = undefined;
|
|
19
|
-
}
|
|
20
|
-
__decorate([
|
|
21
|
-
(0, class_validator_1.IsString)(),
|
|
22
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
23
|
-
__metadata("design:type", Object)
|
|
24
|
-
], CustomerValidator.prototype, "name", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, class_validator_1.IsEmail)(),
|
|
27
|
-
__metadata("design:type", Object)
|
|
28
|
-
], CustomerValidator.prototype, "email", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, class_validator_1.IsString)(),
|
|
31
|
-
(0, class_validator_1.IsOptional)(),
|
|
32
|
-
__metadata("design:type", String)
|
|
33
|
-
], CustomerValidator.prototype, "phone", void 0);
|
|
34
|
-
return CustomerValidator;
|
|
35
|
-
}());
|
|
36
|
-
exports.CustomerValidator = CustomerValidator;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AbstractEntity } from '../../../../abstract/abstract.entity';
|
|
2
|
-
import { ProductEntity } from '../../../inventory/products/product.entity';
|
|
3
|
-
export declare class ItemEntity extends AbstractEntity {
|
|
4
|
-
quantity: number;
|
|
5
|
-
price: number;
|
|
6
|
-
refund: number;
|
|
7
|
-
product: ProductEntity;
|
|
8
|
-
readonly total: number;
|
|
9
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose" />
|
|
25
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
26
|
-
import { ItemEntity } from './item.entity';
|
|
27
|
-
export declare const ItemSchema: import("mongoose").Schema<ItemEntity, import("mongoose").Model<ItemEntity, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ItemEntity>;
|