@merkaly/api 0.3.2 → 0.3.4
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/dist/abstract.entity.d.ts +1 -0
- package/dist/abstract.repository.d.ts +13 -3
- package/dist/account/address/index.js +0 -10
- package/dist/account/cart/index.js +0 -10
- package/dist/account/payment/index.js +0 -10
- package/dist/account/user/index.js +0 -10
- package/dist/account/wishlist/index.js +0 -10
- package/dist/assets/asset/index.js +0 -5
- package/dist/billing/payment/index.js +0 -5
- package/dist/billing/status/index.js +0 -5
- package/dist/index.js +0 -20
- package/dist/inventory/catalog/attribute/index.js +0 -10
- package/dist/inventory/catalog/brand/index.js +0 -10
- package/dist/inventory/catalog/category/index.js +0 -10
- package/dist/inventory/catalog/collection/index.js +0 -10
- package/dist/inventory/catalog/product/index.js +0 -10
- package/dist/inventory/configuration/label/index.js +0 -10
- package/dist/inventory/configuration/measurement/index.js +0 -10
- package/dist/inventory/configuration/unit/index.js +0 -5
- package/dist/inventory/stock/backorder/index.js +0 -10
- package/dist/inventory/stock/transfer/index.js +0 -10
- package/dist/inventory/stock/warehouse/index.js +0 -10
- package/dist/logistic/carrier/index.js +0 -10
- package/dist/logistic/shipment/index.js +0 -10
- package/dist/order/purchase/item/index.js +0 -10
- package/dist/order/purchase/transaction/index.js +0 -10
- package/dist/order/purchase/vendor/index.js +0 -10
- package/dist/order/sale/address/index.js +0 -5
- package/dist/order/sale/customer/index.js +0 -10
- package/dist/order/sale/item/index.js +0 -10
- package/dist/order/sale/payment/index.js +0 -5
- package/dist/order/sale/transaction/index.js +0 -10
- package/dist/order/sale/transaction/transaction.entity.d.ts +1 -1
- package/dist/order/sale/transaction/transaction.validator.d.ts +1 -1
- package/package.json +5 -6
- package/dist/abstract.entity.js +0 -45
- package/dist/abstract.repository.js +0 -200
- package/dist/abstract.validator.js +0 -98
- package/dist/account/address/address.entity.js +0 -34
- package/dist/account/address/address.validator.js +0 -67
- package/dist/account/cart/cart.entity.js +0 -34
- package/dist/account/cart/cart.validator.js +0 -45
- package/dist/account/payment/payment.entity.js +0 -57
- package/dist/account/payment/payment.validator.js +0 -57
- package/dist/account/user/user.entity.js +0 -46
- package/dist/account/user/user.validator.js +0 -68
- package/dist/account/wishlist/wishlist.entity.js +0 -38
- package/dist/account/wishlist/wishlist.validator.js +0 -39
- package/dist/address.entity.js +0 -59
- package/dist/assets/asset/asset.entity.js +0 -58
- package/dist/billing/payment/transaction.entity.js +0 -55
- package/dist/billing/status/status.entity.js +0 -40
- package/dist/inventory/catalog/attribute/attribute.entity.js +0 -47
- package/dist/inventory/catalog/attribute/attribute.validator.js +0 -58
- package/dist/inventory/catalog/brand/brand.entity.js +0 -33
- package/dist/inventory/catalog/brand/brand.validator.js +0 -39
- package/dist/inventory/catalog/category/category.entity.js +0 -33
- package/dist/inventory/catalog/category/category.validator.js +0 -39
- package/dist/inventory/catalog/collection/collection.entity.js +0 -42
- package/dist/inventory/catalog/collection/collection.validator.js +0 -45
- package/dist/inventory/catalog/product/product.entity.js +0 -115
- package/dist/inventory/catalog/product/product.validator.js +0 -135
- package/dist/inventory/configuration/label/label.entity.js +0 -42
- package/dist/inventory/configuration/label/label.validator.js +0 -51
- package/dist/inventory/configuration/measurement/measurement.entity.js +0 -42
- package/dist/inventory/configuration/measurement/measurement.validator.js +0 -87
- package/dist/inventory/configuration/unit/unit.entity.js +0 -46
- package/dist/inventory/stock/backorder/backorder.entity.js +0 -106
- package/dist/inventory/stock/backorder/backorder.validator.js +0 -112
- package/dist/inventory/stock/transfer/transfer.entity.js +0 -108
- package/dist/inventory/stock/transfer/transfer.validator.js +0 -108
- package/dist/inventory/stock/warehouse/warehouse.entity.js +0 -67
- package/dist/inventory/stock/warehouse/warehouse.validator.js +0 -115
- package/dist/logistic/carrier/carrier.entity.js +0 -57
- package/dist/logistic/carrier/carrier.validator.js +0 -69
- package/dist/logistic/shipment/shipment.entity.js +0 -67
- package/dist/logistic/shipment/shipment.validator.js +0 -65
- package/dist/order/purchase/item/item.entity.js +0 -46
- package/dist/order/purchase/item/item.validator.js +0 -41
- package/dist/order/purchase/transaction/transaction.entity.js +0 -67
- package/dist/order/purchase/transaction/transaction.validator.js +0 -87
- package/dist/order/purchase/vendor/vendor.entity.js +0 -62
- package/dist/order/purchase/vendor/vendor.validator.js +0 -75
- package/dist/order/sale/address/address.validator.js +0 -70
- package/dist/order/sale/customer/customer.entity.js +0 -62
- package/dist/order/sale/customer/customer.validator.js +0 -77
- package/dist/order/sale/item/item.entity.js +0 -45
- package/dist/order/sale/item/item.validator.js +0 -34
- package/dist/order/sale/payment/payment.validator.js +0 -51
- package/dist/order/sale/transaction/transaction.entity.js +0 -56
- package/dist/order/sale/transaction/transaction.validator.js +0 -76
|
@@ -1,69 +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.UpdateCarrierValidator = exports.CreateCarrierValidator = exports.ReadCarrierValidator = exports.SearchCarrierValidator = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
const abstract_validator_1 = require("../../../infrastructure/abstracts/abstract.validator");
|
|
15
|
-
class SearchCarrierValidator extends abstract_validator_1.SearchValidator {
|
|
16
|
-
}
|
|
17
|
-
exports.SearchCarrierValidator = SearchCarrierValidator;
|
|
18
|
-
class ReadCarrierValidator extends abstract_validator_1.ReadValidator {
|
|
19
|
-
}
|
|
20
|
-
exports.ReadCarrierValidator = ReadCarrierValidator;
|
|
21
|
-
class CreateCarrierValidator extends abstract_validator_1.AbstractValidator {
|
|
22
|
-
name;
|
|
23
|
-
description;
|
|
24
|
-
website;
|
|
25
|
-
trackingUrl;
|
|
26
|
-
phone;
|
|
27
|
-
email;
|
|
28
|
-
active;
|
|
29
|
-
}
|
|
30
|
-
exports.CreateCarrierValidator = CreateCarrierValidator;
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, class_validator_1.IsString)(),
|
|
33
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
34
|
-
__metadata("design:type", String)
|
|
35
|
-
], CreateCarrierValidator.prototype, "name", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, class_validator_1.IsString)(),
|
|
38
|
-
(0, class_validator_1.IsOptional)(),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], CreateCarrierValidator.prototype, "description", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, class_validator_1.IsUrl)(),
|
|
43
|
-
(0, class_validator_1.IsOptional)(),
|
|
44
|
-
__metadata("design:type", String)
|
|
45
|
-
], CreateCarrierValidator.prototype, "website", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, class_validator_1.IsUrl)(),
|
|
48
|
-
(0, class_validator_1.IsOptional)(),
|
|
49
|
-
__metadata("design:type", String)
|
|
50
|
-
], CreateCarrierValidator.prototype, "trackingUrl", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, class_validator_1.IsString)(),
|
|
53
|
-
(0, class_validator_1.IsOptional)(),
|
|
54
|
-
__metadata("design:type", String)
|
|
55
|
-
], CreateCarrierValidator.prototype, "phone", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, class_validator_1.IsEmail)(),
|
|
58
|
-
(0, class_validator_1.IsOptional)(),
|
|
59
|
-
__metadata("design:type", String)
|
|
60
|
-
], CreateCarrierValidator.prototype, "email", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
(0, class_validator_1.IsBoolean)(),
|
|
63
|
-
(0, class_validator_1.IsOptional)(),
|
|
64
|
-
__metadata("design:type", Boolean)
|
|
65
|
-
], CreateCarrierValidator.prototype, "active", void 0);
|
|
66
|
-
class UpdateCarrierValidator extends CreateCarrierValidator {
|
|
67
|
-
}
|
|
68
|
-
exports.UpdateCarrierValidator = UpdateCarrierValidator;
|
|
69
|
-
//# sourceMappingURL=carrier.validator.js.map
|
|
@@ -1,67 +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.LogisticShippingEntity = void 0;
|
|
13
|
-
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
-
const mongoose_2 = require("mongoose");
|
|
15
|
-
const abstract_entity_1 = require("../../../infrastructure/abstracts/abstract.entity");
|
|
16
|
-
const address_entity_1 = require("../../../infrastructure/entities/address.entity");
|
|
17
|
-
const shipment_enum_1 = require("../enums/shipment.enum");
|
|
18
|
-
const shipment_status_entity_1 = require("./shipment.status.entity");
|
|
19
|
-
let LogisticShippingEntity = class LogisticShippingEntity extends abstract_entity_1.AbstractEntity {
|
|
20
|
-
order;
|
|
21
|
-
statuses = [];
|
|
22
|
-
destinationAddress;
|
|
23
|
-
originAddress;
|
|
24
|
-
cost = 0;
|
|
25
|
-
distance = 0;
|
|
26
|
-
type;
|
|
27
|
-
sequence = 1;
|
|
28
|
-
number;
|
|
29
|
-
currentStatus;
|
|
30
|
-
};
|
|
31
|
-
exports.LogisticShippingEntity = LogisticShippingEntity;
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, mongoose_1.Prop)({ ref: 'order.sale.transactions', required: true, type: mongoose_2.Schema.Types.ObjectId }),
|
|
34
|
-
__metadata("design:type", Object)
|
|
35
|
-
], LogisticShippingEntity.prototype, "order", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, mongoose_1.Prop)({ type: [shipment_status_entity_1.LogisticShippingStatusEntity], default: [] }),
|
|
38
|
-
__metadata("design:type", Array)
|
|
39
|
-
], LogisticShippingEntity.prototype, "statuses", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, mongoose_1.Prop)({ required: true, type: address_entity_1.AddressEntity }),
|
|
42
|
-
__metadata("design:type", Object)
|
|
43
|
-
], LogisticShippingEntity.prototype, "destinationAddress", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, mongoose_1.Prop)({ required: true, type: address_entity_1.AddressEntity }),
|
|
46
|
-
__metadata("design:type", address_entity_1.AddressEntity)
|
|
47
|
-
], LogisticShippingEntity.prototype, "originAddress", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, mongoose_1.Prop)({ default: 0, min: 0, type: mongoose_2.Schema.Types.Number }),
|
|
50
|
-
__metadata("design:type", Object)
|
|
51
|
-
], LogisticShippingEntity.prototype, "cost", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, mongoose_1.Prop)({ default: 0, min: 0, type: mongoose_2.Schema.Types.Number }),
|
|
54
|
-
__metadata("design:type", Object)
|
|
55
|
-
], LogisticShippingEntity.prototype, "distance", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, mongoose_1.Prop)({ enum: shipment_enum_1.LogisticShippingTypeEnum, required: true }),
|
|
58
|
-
__metadata("design:type", String)
|
|
59
|
-
], LogisticShippingEntity.prototype, "type", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, mongoose_1.Prop)({ default: 1, immutable: true, type: mongoose_2.Schema.Types.Number, unique: true }),
|
|
62
|
-
__metadata("design:type", Object)
|
|
63
|
-
], LogisticShippingEntity.prototype, "sequence", void 0);
|
|
64
|
-
exports.LogisticShippingEntity = LogisticShippingEntity = __decorate([
|
|
65
|
-
(0, mongoose_1.Schema)(abstract_entity_1.$collection)
|
|
66
|
-
], LogisticShippingEntity);
|
|
67
|
-
//# sourceMappingURL=shipment.entity.js.map
|
|
@@ -1,65 +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.ReadShippingValidator = exports.UpdateShippingStatusValidator = exports.UpdateShippingValidator = exports.CreateShippingValidator = void 0;
|
|
13
|
-
const class_transformer_1 = require("class-transformer");
|
|
14
|
-
const class_validator_1 = require("class-validator");
|
|
15
|
-
const shipment_enum_1 = require("../enums/shipment.enum");
|
|
16
|
-
const address_validator_1 = require("../../order/sale/validators/address.validator");
|
|
17
|
-
const abstract_validator_1 = require("../../../infrastructure/abstracts/abstract.validator");
|
|
18
|
-
class CreateShippingValidator extends abstract_validator_1.AbstractValidator {
|
|
19
|
-
order;
|
|
20
|
-
warehouse;
|
|
21
|
-
type;
|
|
22
|
-
address;
|
|
23
|
-
cost;
|
|
24
|
-
}
|
|
25
|
-
exports.CreateShippingValidator = CreateShippingValidator;
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, class_validator_1.IsMongoId)(),
|
|
28
|
-
(0, class_validator_1.IsOptional)(),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], CreateShippingValidator.prototype, "order", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, class_validator_1.IsMongoId)(),
|
|
33
|
-
(0, class_validator_1.IsOptional)(),
|
|
34
|
-
__metadata("design:type", String)
|
|
35
|
-
], CreateShippingValidator.prototype, "warehouse", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, class_validator_1.IsEnum)(shipment_enum_1.LogisticShippingTypeEnum),
|
|
38
|
-
__metadata("design:type", String)
|
|
39
|
-
], CreateShippingValidator.prototype, "type", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, class_transformer_1.Type)(() => address_validator_1.SaleOrderAddressValidator),
|
|
42
|
-
(0, class_validator_1.ValidateNested)(),
|
|
43
|
-
(0, class_validator_1.IsObject)(),
|
|
44
|
-
__metadata("design:type", address_validator_1.SaleOrderAddressValidator)
|
|
45
|
-
], CreateShippingValidator.prototype, "address", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, class_validator_1.IsPositive)(),
|
|
48
|
-
(0, class_validator_1.IsOptional)(),
|
|
49
|
-
__metadata("design:type", Number)
|
|
50
|
-
], CreateShippingValidator.prototype, "cost", void 0);
|
|
51
|
-
class UpdateShippingValidator extends CreateShippingValidator {
|
|
52
|
-
}
|
|
53
|
-
exports.UpdateShippingValidator = UpdateShippingValidator;
|
|
54
|
-
class UpdateShippingStatusValidator {
|
|
55
|
-
type;
|
|
56
|
-
}
|
|
57
|
-
exports.UpdateShippingStatusValidator = UpdateShippingStatusValidator;
|
|
58
|
-
__decorate([
|
|
59
|
-
(0, class_validator_1.IsEnum)(shipment_enum_1.LogisticShippingStatusEnum),
|
|
60
|
-
__metadata("design:type", String)
|
|
61
|
-
], UpdateShippingStatusValidator.prototype, "type", void 0);
|
|
62
|
-
class ReadShippingValidator extends abstract_validator_1.ReadValidator {
|
|
63
|
-
}
|
|
64
|
-
exports.ReadShippingValidator = ReadShippingValidator;
|
|
65
|
-
//# sourceMappingURL=shipment.validator.js.map
|
|
@@ -1,46 +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.PurchaseItemEntity = void 0;
|
|
13
|
-
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
-
const schema_decorator_1 = require("@nestjs/mongoose/dist/decorators/schema.decorator");
|
|
15
|
-
const mongoose_2 = require("mongoose");
|
|
16
|
-
const product_schema_1 = require("../../../inventory/catalog/schemas/product.schema");
|
|
17
|
-
const abstract_entity_1 = require("../../../../infrastructure/abstracts/abstract.entity");
|
|
18
|
-
let PurchaseItemEntity = class PurchaseItemEntity extends abstract_entity_1.AbstractEntity {
|
|
19
|
-
product;
|
|
20
|
-
cost;
|
|
21
|
-
quantity;
|
|
22
|
-
notes;
|
|
23
|
-
total;
|
|
24
|
-
unitCost;
|
|
25
|
-
};
|
|
26
|
-
exports.PurchaseItemEntity = PurchaseItemEntity;
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, mongoose_1.Prop)({ ref: product_schema_1.InventoryCatalogProductSchema.name, type: mongoose_2.Schema.Types.ObjectId }),
|
|
29
|
-
__metadata("design:type", Object)
|
|
30
|
-
], PurchaseItemEntity.prototype, "product", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, mongoose_1.Prop)({ default: 0, type: mongoose_2.Schema.Types.Number }),
|
|
33
|
-
__metadata("design:type", Number)
|
|
34
|
-
], PurchaseItemEntity.prototype, "cost", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number, min: 1, default: 1 }),
|
|
37
|
-
__metadata("design:type", Number)
|
|
38
|
-
], PurchaseItemEntity.prototype, "quantity", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: () => '', trim: true }),
|
|
41
|
-
__metadata("design:type", String)
|
|
42
|
-
], PurchaseItemEntity.prototype, "notes", void 0);
|
|
43
|
-
exports.PurchaseItemEntity = PurchaseItemEntity = __decorate([
|
|
44
|
-
(0, schema_decorator_1.Schema)({ ...abstract_entity_1.$collection, collection: null })
|
|
45
|
-
], PurchaseItemEntity);
|
|
46
|
-
//# sourceMappingURL=item.entity.js.map
|
|
@@ -1,41 +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.PurchaseItemValidator = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
const abstract_validator_1 = require("../../../../infrastructure/abstracts/abstract.validator");
|
|
15
|
-
class PurchaseItemValidator extends abstract_validator_1.AbstractValidator {
|
|
16
|
-
product = String();
|
|
17
|
-
cost = 0;
|
|
18
|
-
quantity = 1;
|
|
19
|
-
notes = String();
|
|
20
|
-
}
|
|
21
|
-
exports.PurchaseItemValidator = PurchaseItemValidator;
|
|
22
|
-
__decorate([
|
|
23
|
-
(0, class_validator_1.IsMongoId)(),
|
|
24
|
-
__metadata("design:type", Object)
|
|
25
|
-
], PurchaseItemValidator.prototype, "product", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, class_validator_1.IsNumber)(),
|
|
28
|
-
(0, class_validator_1.Min)(0),
|
|
29
|
-
__metadata("design:type", Object)
|
|
30
|
-
], PurchaseItemValidator.prototype, "cost", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, class_validator_1.IsNumber)(),
|
|
33
|
-
(0, class_validator_1.Min)(1),
|
|
34
|
-
__metadata("design:type", Object)
|
|
35
|
-
], PurchaseItemValidator.prototype, "quantity", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, class_validator_1.IsString)(),
|
|
38
|
-
(0, class_validator_1.IsOptional)(),
|
|
39
|
-
__metadata("design:type", Object)
|
|
40
|
-
], PurchaseItemValidator.prototype, "notes", void 0);
|
|
41
|
-
//# sourceMappingURL=item.validator.js.map
|
|
@@ -1,67 +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.PurchaseTransactionEntity = void 0;
|
|
13
|
-
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
-
const mongoose_2 = require("mongoose");
|
|
15
|
-
const user_schema_1 = require("../../../account/schemas/user.schema");
|
|
16
|
-
const item_schema_1 = require("../schemas/item.schema");
|
|
17
|
-
const vendor_schema_1 = require("../schemas/vendor.schema");
|
|
18
|
-
const abstract_entity_1 = require("../../../../infrastructure/abstracts/abstract.entity");
|
|
19
|
-
const transaction_enum_1 = require("../enums/transaction.enum");
|
|
20
|
-
let PurchaseTransactionEntity = class PurchaseTransactionEntity extends abstract_entity_1.AbstractEntity {
|
|
21
|
-
user;
|
|
22
|
-
vendor;
|
|
23
|
-
items = [];
|
|
24
|
-
sequence = 0;
|
|
25
|
-
notes;
|
|
26
|
-
status;
|
|
27
|
-
expectedDeliveryDate;
|
|
28
|
-
number;
|
|
29
|
-
total;
|
|
30
|
-
};
|
|
31
|
-
exports.PurchaseTransactionEntity = PurchaseTransactionEntity;
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, mongoose_1.Prop)({ ref: user_schema_1.AccountUserSchema.name, required: true, type: mongoose_2.Schema.Types.String }),
|
|
34
|
-
__metadata("design:type", Object)
|
|
35
|
-
], PurchaseTransactionEntity.prototype, "user", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, mongoose_1.Prop)({ ref: vendor_schema_1.PurchaseVendorSchema.name, type: mongoose_2.Schema.Types.ObjectId }),
|
|
38
|
-
__metadata("design:type", Object)
|
|
39
|
-
], PurchaseTransactionEntity.prototype, "vendor", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, mongoose_1.Prop)({ default: () => [], type: [item_schema_1.PurchaseItemSchema.schema] }),
|
|
42
|
-
__metadata("design:type", Array)
|
|
43
|
-
], PurchaseTransactionEntity.prototype, "items", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, mongoose_1.Prop)({ default: 1, immutable: true, type: mongoose_2.Schema.Types.Number, unique: true }),
|
|
46
|
-
__metadata("design:type", Object)
|
|
47
|
-
], PurchaseTransactionEntity.prototype, "sequence", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, trim: true }),
|
|
50
|
-
__metadata("design:type", String)
|
|
51
|
-
], PurchaseTransactionEntity.prototype, "notes", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, mongoose_1.Prop)({
|
|
54
|
-
default: () => transaction_enum_1.PurchaseTransactionStatusEnum.DRAFT,
|
|
55
|
-
enum: transaction_enum_1.PurchaseTransactionStatusEnum,
|
|
56
|
-
type: mongoose_2.Schema.Types.String,
|
|
57
|
-
}),
|
|
58
|
-
__metadata("design:type", String)
|
|
59
|
-
], PurchaseTransactionEntity.prototype, "status", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date }),
|
|
62
|
-
__metadata("design:type", Date)
|
|
63
|
-
], PurchaseTransactionEntity.prototype, "expectedDeliveryDate", void 0);
|
|
64
|
-
exports.PurchaseTransactionEntity = PurchaseTransactionEntity = __decorate([
|
|
65
|
-
(0, mongoose_1.Schema)(abstract_entity_1.$collection)
|
|
66
|
-
], PurchaseTransactionEntity);
|
|
67
|
-
//# sourceMappingURL=transaction.entity.js.map
|
|
@@ -1,87 +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.UpdatePurchaseTransactionValidator = exports.CreatePurchaseTransactionValidator = exports.ReadPurchaseTransactionValidator = exports.SearchPurchaseTransactionValidator = void 0;
|
|
13
|
-
const class_transformer_1 = require("class-transformer");
|
|
14
|
-
const class_validator_1 = require("class-validator");
|
|
15
|
-
const transaction_enum_1 = require("../enums/transaction.enum");
|
|
16
|
-
const abstract_validator_1 = require("../../../../infrastructure/abstracts/abstract.validator");
|
|
17
|
-
const item_validator_1 = require("./item.validator");
|
|
18
|
-
class SearchPurchaseTransactionValidator extends abstract_validator_1.SearchValidator {
|
|
19
|
-
}
|
|
20
|
-
exports.SearchPurchaseTransactionValidator = SearchPurchaseTransactionValidator;
|
|
21
|
-
class ReadPurchaseTransactionValidator extends abstract_validator_1.ReadValidator {
|
|
22
|
-
}
|
|
23
|
-
exports.ReadPurchaseTransactionValidator = ReadPurchaseTransactionValidator;
|
|
24
|
-
class CreatePurchaseTransactionValidator extends abstract_validator_1.AbstractValidator {
|
|
25
|
-
items = [];
|
|
26
|
-
notes = String();
|
|
27
|
-
user;
|
|
28
|
-
vendor;
|
|
29
|
-
status = transaction_enum_1.PurchaseTransactionStatusEnum.DRAFT;
|
|
30
|
-
expectedDeliveryDate;
|
|
31
|
-
}
|
|
32
|
-
exports.CreatePurchaseTransactionValidator = CreatePurchaseTransactionValidator;
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, class_validator_1.IsArray)(),
|
|
35
|
-
(0, class_validator_1.ArrayNotEmpty)(),
|
|
36
|
-
(0, class_transformer_1.Type)(() => item_validator_1.PurchaseItemValidator),
|
|
37
|
-
(0, class_validator_1.ValidateNested)(),
|
|
38
|
-
__metadata("design:type", Array)
|
|
39
|
-
], CreatePurchaseTransactionValidator.prototype, "items", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, class_validator_1.IsString)(),
|
|
42
|
-
(0, class_validator_1.IsOptional)(),
|
|
43
|
-
__metadata("design:type", Object)
|
|
44
|
-
], CreatePurchaseTransactionValidator.prototype, "notes", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, class_validator_1.IsString)(),
|
|
47
|
-
__metadata("design:type", String)
|
|
48
|
-
], CreatePurchaseTransactionValidator.prototype, "user", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, class_validator_1.IsMongoId)(),
|
|
51
|
-
(0, class_validator_1.IsOptional)(),
|
|
52
|
-
__metadata("design:type", String)
|
|
53
|
-
], CreatePurchaseTransactionValidator.prototype, "vendor", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
(0, class_validator_1.IsEnum)(transaction_enum_1.PurchaseTransactionStatusEnum),
|
|
56
|
-
(0, class_validator_1.IsOptional)(),
|
|
57
|
-
__metadata("design:type", Object)
|
|
58
|
-
], CreatePurchaseTransactionValidator.prototype, "status", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
(0, class_validator_1.IsDate)(),
|
|
61
|
-
(0, class_validator_1.IsOptional)(),
|
|
62
|
-
(0, class_transformer_1.Type)(() => Date),
|
|
63
|
-
__metadata("design:type", Date)
|
|
64
|
-
], CreatePurchaseTransactionValidator.prototype, "expectedDeliveryDate", void 0);
|
|
65
|
-
class UpdatePurchaseTransactionValidator extends abstract_validator_1.AbstractValidator {
|
|
66
|
-
notes;
|
|
67
|
-
status;
|
|
68
|
-
expectedDeliveryDate;
|
|
69
|
-
}
|
|
70
|
-
exports.UpdatePurchaseTransactionValidator = UpdatePurchaseTransactionValidator;
|
|
71
|
-
__decorate([
|
|
72
|
-
(0, class_validator_1.IsString)(),
|
|
73
|
-
(0, class_validator_1.IsOptional)(),
|
|
74
|
-
__metadata("design:type", String)
|
|
75
|
-
], UpdatePurchaseTransactionValidator.prototype, "notes", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
(0, class_validator_1.IsEnum)(transaction_enum_1.PurchaseTransactionStatusEnum),
|
|
78
|
-
(0, class_validator_1.IsOptional)(),
|
|
79
|
-
__metadata("design:type", String)
|
|
80
|
-
], UpdatePurchaseTransactionValidator.prototype, "status", void 0);
|
|
81
|
-
__decorate([
|
|
82
|
-
(0, class_validator_1.IsDate)(),
|
|
83
|
-
(0, class_validator_1.IsOptional)(),
|
|
84
|
-
(0, class_transformer_1.Type)(() => Date),
|
|
85
|
-
__metadata("design:type", Date)
|
|
86
|
-
], UpdatePurchaseTransactionValidator.prototype, "expectedDeliveryDate", void 0);
|
|
87
|
-
//# sourceMappingURL=transaction.validator.js.map
|
|
@@ -1,62 +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.PurchaseVendorEntity = void 0;
|
|
13
|
-
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
-
const mongoose_2 = require("mongoose");
|
|
15
|
-
const abstract_entity_1 = require("../../../../infrastructure/abstracts/abstract.entity");
|
|
16
|
-
let PurchaseVendorEntity = class PurchaseVendorEntity extends abstract_entity_1.AbstractEntity {
|
|
17
|
-
name;
|
|
18
|
-
description;
|
|
19
|
-
email;
|
|
20
|
-
phone;
|
|
21
|
-
website;
|
|
22
|
-
logo;
|
|
23
|
-
taxId;
|
|
24
|
-
active;
|
|
25
|
-
};
|
|
26
|
-
exports.PurchaseVendorEntity = PurchaseVendorEntity;
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, mongoose_1.Prop)({ required: true, trim: true, type: mongoose_2.Schema.Types.String }),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], PurchaseVendorEntity.prototype, "name", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
33
|
-
__metadata("design:type", String)
|
|
34
|
-
], PurchaseVendorEntity.prototype, "description", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, mongoose_1.Prop)({ lowercase: true, type: mongoose_2.Schema.Types.String }),
|
|
37
|
-
__metadata("design:type", String)
|
|
38
|
-
], PurchaseVendorEntity.prototype, "email", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
41
|
-
__metadata("design:type", String)
|
|
42
|
-
], PurchaseVendorEntity.prototype, "phone", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
45
|
-
__metadata("design:type", String)
|
|
46
|
-
], PurchaseVendorEntity.prototype, "website", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
49
|
-
__metadata("design:type", String)
|
|
50
|
-
], PurchaseVendorEntity.prototype, "logo", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
53
|
-
__metadata("design:type", String)
|
|
54
|
-
], PurchaseVendorEntity.prototype, "taxId", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, mongoose_1.Prop)({ default: true, type: mongoose_2.Schema.Types.Boolean }),
|
|
57
|
-
__metadata("design:type", Boolean)
|
|
58
|
-
], PurchaseVendorEntity.prototype, "active", void 0);
|
|
59
|
-
exports.PurchaseVendorEntity = PurchaseVendorEntity = __decorate([
|
|
60
|
-
(0, mongoose_1.Schema)(abstract_entity_1.$collection)
|
|
61
|
-
], PurchaseVendorEntity);
|
|
62
|
-
//# sourceMappingURL=vendor.entity.js.map
|
|
@@ -1,75 +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.UpdatePurchaseVendorValidator = exports.CreatePurchaseVendorValidator = exports.ReadPurchaseVendorValidator = exports.SearchPurchaseVendorValidator = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
const abstract_validator_1 = require("../../../../infrastructure/abstracts/abstract.validator");
|
|
15
|
-
class SearchPurchaseVendorValidator extends abstract_validator_1.SearchValidator {
|
|
16
|
-
}
|
|
17
|
-
exports.SearchPurchaseVendorValidator = SearchPurchaseVendorValidator;
|
|
18
|
-
class ReadPurchaseVendorValidator extends abstract_validator_1.ReadValidator {
|
|
19
|
-
}
|
|
20
|
-
exports.ReadPurchaseVendorValidator = ReadPurchaseVendorValidator;
|
|
21
|
-
class CreatePurchaseVendorValidator extends abstract_validator_1.AbstractValidator {
|
|
22
|
-
name = String();
|
|
23
|
-
description = String();
|
|
24
|
-
email = String();
|
|
25
|
-
logo = String();
|
|
26
|
-
phone = String();
|
|
27
|
-
website = String();
|
|
28
|
-
taxId = String();
|
|
29
|
-
active = Boolean();
|
|
30
|
-
}
|
|
31
|
-
exports.CreatePurchaseVendorValidator = CreatePurchaseVendorValidator;
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, class_validator_1.IsString)(),
|
|
34
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
35
|
-
__metadata("design:type", Object)
|
|
36
|
-
], CreatePurchaseVendorValidator.prototype, "name", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, class_validator_1.IsString)(),
|
|
39
|
-
(0, class_validator_1.IsOptional)(),
|
|
40
|
-
__metadata("design:type", Object)
|
|
41
|
-
], CreatePurchaseVendorValidator.prototype, "description", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, class_validator_1.IsEmail)(),
|
|
44
|
-
(0, class_validator_1.IsOptional)(),
|
|
45
|
-
__metadata("design:type", Object)
|
|
46
|
-
], CreatePurchaseVendorValidator.prototype, "email", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, class_validator_1.IsUrl)(),
|
|
49
|
-
(0, class_validator_1.IsOptional)(),
|
|
50
|
-
__metadata("design:type", Object)
|
|
51
|
-
], CreatePurchaseVendorValidator.prototype, "logo", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, class_validator_1.IsString)(),
|
|
54
|
-
(0, class_validator_1.IsOptional)(),
|
|
55
|
-
__metadata("design:type", Object)
|
|
56
|
-
], CreatePurchaseVendorValidator.prototype, "phone", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, class_validator_1.IsString)(),
|
|
59
|
-
(0, class_validator_1.IsOptional)(),
|
|
60
|
-
__metadata("design:type", Object)
|
|
61
|
-
], CreatePurchaseVendorValidator.prototype, "website", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, class_validator_1.IsString)(),
|
|
64
|
-
(0, class_validator_1.IsOptional)(),
|
|
65
|
-
__metadata("design:type", Object)
|
|
66
|
-
], CreatePurchaseVendorValidator.prototype, "taxId", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
(0, class_validator_1.IsBoolean)(),
|
|
69
|
-
(0, class_validator_1.IsOptional)(),
|
|
70
|
-
__metadata("design:type", Object)
|
|
71
|
-
], CreatePurchaseVendorValidator.prototype, "active", void 0);
|
|
72
|
-
class UpdatePurchaseVendorValidator extends CreatePurchaseVendorValidator {
|
|
73
|
-
}
|
|
74
|
-
exports.UpdatePurchaseVendorValidator = UpdatePurchaseVendorValidator;
|
|
75
|
-
//# sourceMappingURL=vendor.validator.js.map
|
|
@@ -1,70 +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.SaleOrderAddressValidator = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
class SaleOrderAddressValidator {
|
|
15
|
-
line1;
|
|
16
|
-
line2;
|
|
17
|
-
city;
|
|
18
|
-
state;
|
|
19
|
-
locality;
|
|
20
|
-
country;
|
|
21
|
-
code;
|
|
22
|
-
longitude;
|
|
23
|
-
latitude;
|
|
24
|
-
}
|
|
25
|
-
exports.SaleOrderAddressValidator = SaleOrderAddressValidator;
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, class_validator_1.IsString)(),
|
|
28
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], SaleOrderAddressValidator.prototype, "line1", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, class_validator_1.IsString)(),
|
|
33
|
-
(0, class_validator_1.IsOptional)(),
|
|
34
|
-
__metadata("design:type", String)
|
|
35
|
-
], SaleOrderAddressValidator.prototype, "line2", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, class_validator_1.IsString)(),
|
|
38
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], SaleOrderAddressValidator.prototype, "city", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, class_validator_1.IsAlpha)(),
|
|
43
|
-
(0, class_validator_1.Length)(2, 2),
|
|
44
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
45
|
-
__metadata("design:type", String)
|
|
46
|
-
], SaleOrderAddressValidator.prototype, "state", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, class_validator_1.IsString)(),
|
|
49
|
-
(0, class_validator_1.IsOptional)(),
|
|
50
|
-
__metadata("design:type", String)
|
|
51
|
-
], SaleOrderAddressValidator.prototype, "locality", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, class_validator_1.IsAlpha)(),
|
|
54
|
-
(0, class_validator_1.Length)(2, 2),
|
|
55
|
-
__metadata("design:type", String)
|
|
56
|
-
], SaleOrderAddressValidator.prototype, "country", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, class_validator_1.IsString)(),
|
|
59
|
-
(0, class_validator_1.IsOptional)(),
|
|
60
|
-
__metadata("design:type", String)
|
|
61
|
-
], SaleOrderAddressValidator.prototype, "code", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, class_validator_1.IsLongitude)(),
|
|
64
|
-
__metadata("design:type", Number)
|
|
65
|
-
], SaleOrderAddressValidator.prototype, "longitude", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
(0, class_validator_1.IsLatitude)(),
|
|
68
|
-
__metadata("design:type", Number)
|
|
69
|
-
], SaleOrderAddressValidator.prototype, "latitude", void 0);
|
|
70
|
-
//# sourceMappingURL=address.validator.js.map
|