@merkaly/api 0.2.5-8 → 0.3.0
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/account/address/address.entity.d.ts +7 -0
- package/dist/account/address/address.validator.d.ts +17 -0
- package/dist/account/address/index.d.ts +2 -0
- package/dist/account/address/index.js +2 -0
- package/dist/account/user/index.d.ts +2 -0
- package/dist/account/user/index.js +2 -0
- package/dist/account/user/user.entity.d.ts +8 -0
- package/dist/account/user/user.validator.d.ts +17 -0
- package/dist/billing/payment/index.d.ts +2 -0
- package/dist/billing/payment/index.js +5 -0
- package/dist/billing/payment/payment.enum.d.ts +15 -0
- package/dist/billing/payment/payment.enum.js +21 -0
- package/dist/billing/payment/transaction.entity.d.ts +15 -0
- package/dist/billing/status/index.d.ts +1 -0
- package/dist/billing/status/index.js +2 -0
- package/dist/billing/status/status.entity.d.ts +8 -0
- package/dist/inventory/catalog/attribute/attribute.entity.d.ts +8 -0
- package/dist/inventory/catalog/attribute/attribute.validator.d.ts +15 -0
- package/dist/inventory/catalog/attribute/index.d.ts +2 -0
- package/dist/inventory/catalog/attribute/index.js +2 -0
- package/dist/inventory/catalog/brand/brand.entity.d.ts +7 -0
- package/dist/inventory/catalog/brand/brand.validator.d.ts +12 -0
- package/dist/inventory/catalog/brand/index.d.ts +2 -0
- package/dist/inventory/catalog/brand/index.js +2 -0
- package/dist/inventory/catalog/category/category.entity.d.ts +7 -0
- package/dist/inventory/catalog/category/category.validator.d.ts +12 -0
- package/dist/inventory/catalog/category/index.d.ts +2 -0
- package/dist/inventory/catalog/category/index.js +2 -0
- package/dist/inventory/catalog/collection/collection.entity.d.ts +7 -0
- package/dist/inventory/catalog/collection/collection.validator.d.ts +13 -0
- package/dist/inventory/catalog/collection/index.d.ts +2 -0
- package/dist/inventory/catalog/collection/index.js +2 -0
- package/dist/inventory/catalog/product/index.d.ts +3 -0
- package/dist/inventory/catalog/product/index.js +4 -0
- package/dist/inventory/catalog/product/product.entity.d.ts +31 -0
- package/dist/inventory/catalog/product/product.status.enum.d.ts +8 -0
- package/dist/inventory/catalog/product/product.status.enum.js +13 -0
- package/dist/inventory/catalog/product/product.validator.d.ts +39 -0
- package/dist/inventory/configuration/label/index.d.ts +2 -0
- package/dist/inventory/configuration/label/index.js +2 -0
- package/dist/inventory/configuration/label/label.entity.d.ts +7 -0
- package/dist/inventory/configuration/label/label.validator.d.ts +14 -0
- package/dist/inventory/configuration/measurement/index.d.ts +1 -0
- package/dist/inventory/configuration/measurement/index.js +2 -0
- package/dist/inventory/configuration/measurement/measurement.entity.d.ts +8 -0
- package/dist/inventory/configuration/unit/index.d.ts +1 -0
- package/dist/inventory/configuration/unit/index.js +2 -0
- package/dist/inventory/configuration/unit/unit.entity.d.ts +8 -0
- package/dist/inventory/stock/backorder/backorder.entity.d.ts +33 -0
- package/dist/inventory/stock/backorder/backorder.validator.d.ts +24 -0
- package/dist/inventory/stock/backorder/index.d.ts +2 -0
- package/dist/inventory/stock/backorder/index.js +2 -0
- package/dist/inventory/stock/transfer/index.d.ts +2 -0
- package/dist/inventory/stock/transfer/index.js +2 -0
- package/dist/inventory/stock/transfer/transfer.entity.d.ts +28 -0
- package/dist/inventory/stock/transfer/transfer.validator.d.ts +25 -0
- package/dist/inventory/stock/warehouse/index.d.ts +2 -0
- package/dist/inventory/stock/warehouse/index.js +2 -0
- package/dist/inventory/stock/warehouse/warehouse.entity.d.ts +21 -0
- package/dist/inventory/stock/warehouse/warehouse.validator.d.ts +27 -0
- package/dist/logistic/carrier/carrier.entity.d.ts +10 -0
- package/dist/logistic/carrier/carrier.validator.d.ts +17 -0
- package/dist/logistic/carrier/index.d.ts +2 -0
- package/dist/logistic/carrier/index.js +2 -0
- package/dist/logistic/shipment/index.d.ts +3 -0
- package/dist/logistic/shipment/index.js +5 -0
- package/dist/logistic/shipment/shipment.entity.d.ts +19 -0
- package/dist/logistic/shipment/shipment.enum.d.ts +16 -0
- package/dist/logistic/shipment/shipment.enum.js +22 -0
- package/dist/logistic/shipment/shipment.validator.d.ts +18 -0
- package/dist/order/purchase/item/index.d.ts +2 -0
- package/dist/order/purchase/item/index.js +2 -0
- package/dist/order/purchase/item/item.entity.d.ts +11 -0
- package/dist/order/purchase/item/item.validator.d.ts +7 -0
- package/dist/order/purchase/transaction/index.d.ts +3 -0
- package/dist/order/purchase/transaction/index.js +4 -0
- package/dist/order/purchase/transaction/transaction.entity.d.ts +17 -0
- package/dist/order/purchase/transaction/transaction.enum.d.ts +8 -0
- package/dist/order/purchase/transaction/transaction.enum.js +13 -0
- package/dist/order/purchase/transaction/transaction.validator.d.ts +21 -0
- package/dist/order/purchase/vendor/index.d.ts +2 -0
- package/dist/order/purchase/vendor/index.js +2 -0
- package/dist/order/purchase/vendor/vendor.entity.d.ts +11 -0
- package/dist/order/purchase/vendor/vendor.validator.d.ts +18 -0
- package/dist/order/sale/customer/customer.entity.d.ts +11 -0
- package/dist/order/sale/customer/customer.validator.d.ts +18 -0
- package/dist/order/sale/customer/index.d.ts +2 -0
- package/dist/order/sale/customer/index.js +2 -0
- package/dist/order/sale/item/index.d.ts +2 -0
- package/dist/order/sale/item/index.js +2 -0
- package/dist/order/sale/item/item.entity.d.ts +10 -0
- package/dist/order/sale/item/item.validator.d.ts +5 -0
- package/dist/order/sale/transaction/index.d.ts +3 -0
- package/dist/order/sale/transaction/index.js +4 -0
- package/dist/order/sale/transaction/transaction.entity.d.ts +21 -0
- package/dist/order/sale/transaction/transaction.enum.d.ts +8 -0
- package/dist/order/sale/transaction/transaction.enum.js +13 -0
- package/dist/order/sale/transaction/transaction.validator.d.ts +21 -0
- package/package.json +102 -86
- package/.output/abstracts/abstract.entity.d.ts +0 -14
- package/.output/abstracts/abstract.validator.d.ts +0 -24
- package/.output/abstracts/abstract.validator.js +0 -118
- package/.output/exceptions/missing-identity.exception.d.ts +0 -5
- package/.output/exceptions/missing-identity.exception.js +0 -30
- package/.output/modules/asset/files/file.entity.d.ts +0 -9
- package/.output/modules/asset/files/file.schema.d.ts +0 -34
- package/.output/modules/asset/files/file.schema.js +0 -10
- package/.output/modules/auth/organizations/organization.entity.d.ts +0 -8
- package/.output/modules/auth/users/user.entity.d.ts +0 -9
- package/.output/modules/auth/users/user.schema.d.ts +0 -34
- package/.output/modules/auth/users/user.schema.js +0 -10
- package/.output/modules/auth/users/user.validator.d.ts +0 -12
- package/.output/modules/auth/users/user.validator.js +0 -58
- package/.output/modules/inventory/brands/brand.entity.d.ts +0 -6
- package/.output/modules/inventory/brands/brand.schema.d.ts +0 -34
- package/.output/modules/inventory/brands/brand.schema.js +0 -10
- package/.output/modules/inventory/brands/brand.validator.d.ts +0 -11
- package/.output/modules/inventory/brands/brand.validator.js +0 -74
- package/.output/modules/inventory/categories/category.entity.d.ts +0 -6
- package/.output/modules/inventory/categories/category.schema.d.ts +0 -34
- package/.output/modules/inventory/categories/category.schema.js +0 -10
- package/.output/modules/inventory/categories/category.validator.d.ts +0 -8
- package/.output/modules/inventory/categories/category.validator.js +0 -42
- package/.output/modules/inventory/products/documents/attribute.document.d.ts +0 -5
- package/.output/modules/inventory/products/documents/attribute.document.js +0 -33
- package/.output/modules/inventory/products/documents/dimension.document.d.ts +0 -6
- package/.output/modules/inventory/products/documents/dimension.document.js +0 -35
- package/.output/modules/inventory/products/product.entity.d.ts +0 -19
- package/.output/modules/inventory/products/product.schema.d.ts +0 -34
- package/.output/modules/inventory/products/product.schema.js +0 -18
- package/.output/modules/inventory/products/product.validator.d.ts +0 -29
- package/.output/modules/inventory/products/product.validator.js +0 -181
- package/.output/modules/inventory/products/validators/attributes.validator.d.ts +0 -5
- package/.output/modules/inventory/products/validators/attributes.validator.js +0 -35
- package/.output/modules/inventory/products/validators/dimension.validator.d.ts +0 -6
- package/.output/modules/inventory/products/validators/dimension.validator.js +0 -38
- package/.output/modules/sale/customers/customer.entity.d.ts +0 -8
- package/.output/modules/sale/customers/customer.schema.d.ts +0 -34
- package/.output/modules/sale/customers/customer.schema.js +0 -10
- package/.output/modules/sale/customers/customer.validator.d.ts +0 -14
- package/.output/modules/sale/customers/customer.validator.js +0 -94
- package/.output/modules/sale/orders/documents/address.document.d.ts +0 -8
- package/.output/modules/sale/orders/documents/address.document.js +0 -43
- package/.output/modules/sale/orders/documents/status.document.d.ts +0 -8
- package/.output/modules/sale/orders/documents/status.document.js +0 -34
- package/.output/modules/sale/orders/entities/item.entity.d.ts +0 -38
- package/.output/modules/sale/orders/enums/order.status.d.ts +0 -6
- package/.output/modules/sale/orders/enums/order.status.js +0 -10
- package/.output/modules/sale/orders/order.entity.d.ts +0 -21
- package/.output/modules/sale/orders/order.validator.d.ts +0 -16
- package/.output/modules/sale/orders/order.validator.js +0 -86
- package/.output/modules/sale/orders/validators/address.validator.d.ts +0 -17
- package/.output/modules/sale/orders/validators/address.validator.js +0 -81
- package/.output/modules/sale/orders/validators/billing.validator.d.ts +0 -8
- package/.output/modules/sale/orders/validators/billing.validator.js +0 -13
- package/.output/modules/sale/orders/validators/item.validator.d.ts +0 -5
- package/.output/modules/sale/orders/validators/item.validator.js +0 -32
- package/.output/modules/sale/orders/validators/payment.validator.d.ts +0 -10
- package/.output/modules/sale/orders/validators/payment.validator.js +0 -62
- package/.output/modules/sale/orders/validators/shipping.validator.d.ts +0 -9
- package/.output/modules/sale/orders/validators/shipping.validator.js +0 -14
- package/.output/modules/sale/payments/entities/status.entity.d.ts +0 -8
- package/.output/modules/sale/payments/enums/billing.type.d.ts +0 -6
- package/.output/modules/sale/payments/enums/billing.type.js +0 -10
- package/.output/modules/sale/payments/enums/payment.status.d.ts +0 -7
- package/.output/modules/sale/payments/enums/payment.status.js +0 -11
- package/.output/modules/sale/payments/enums/shipping.type.d.ts +0 -4
- package/.output/modules/sale/payments/enums/shipping.type.js +0 -8
- package/.output/modules/sale/payments/payment.entity.d.ts +0 -12
- package/.output/modules/sale/payments/payment.schema.d.ts +0 -34
- package/.output/modules/sale/payments/payment.schema.js +0 -14
- package/.output/modules/sale/payments/payment.validator.d.ts +0 -16
- package/.output/modules/sale/payments/payment.validator.js +0 -77
- package/.output/tsconfig.package.tsbuildinfo +0 -1
- package/README.md +0 -79
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AbstractValidator } from '../../../abstracts/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,74 +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("../../../abstracts/abstract.validator");
|
|
30
|
-
var CreateBrandValidator = exports.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
|
-
(0, class_validator_1.IsOptional)(),
|
|
48
|
-
__metadata("design:type", String)
|
|
49
|
-
], CreateBrandValidator.prototype, "image", void 0);
|
|
50
|
-
return CreateBrandValidator;
|
|
51
|
-
}(abstract_validator_1.AbstractValidator));
|
|
52
|
-
var UpdateBrandValidator = exports.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));
|
|
@@ -1,34 +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 { CategoryEntity } from './category.entity';
|
|
27
|
-
export declare namespace CategorySchema {
|
|
28
|
-
const name = "inventory_categories";
|
|
29
|
-
const schema: import("mongoose").Schema<CategoryEntity, import("mongoose").Model<CategoryEntity, any, any, any, import("mongoose").Document<unknown, any, CategoryEntity> & CategoryEntity & Required<{
|
|
30
|
-
_id: string;
|
|
31
|
-
}>, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, CategoryEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<CategoryEntity>> & import("mongoose").FlatRecord<CategoryEntity> & Required<{
|
|
32
|
-
_id: string;
|
|
33
|
-
}>>;
|
|
34
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CategorySchema = void 0;
|
|
4
|
-
var mongoose_1 = require("@nestjs/mongoose");
|
|
5
|
-
var category_entity_1 = require("./category.entity");
|
|
6
|
-
var CategorySchema;
|
|
7
|
-
(function (CategorySchema) {
|
|
8
|
-
CategorySchema.name = 'inventory_categories';
|
|
9
|
-
CategorySchema.schema = mongoose_1.SchemaFactory.createForClass(category_entity_1.CategoryEntity);
|
|
10
|
-
})(CategorySchema || (exports.CategorySchema = CategorySchema = {}));
|
|
@@ -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.UpdateCategoryValidator = exports.CreateCategoryValidator = void 0;
|
|
13
|
-
var class_validator_1 = require("class-validator");
|
|
14
|
-
var CreateCategoryValidator = exports.CreateCategoryValidator = (function () {
|
|
15
|
-
function CreateCategoryValidator() {
|
|
16
|
-
}
|
|
17
|
-
__decorate([
|
|
18
|
-
(0, class_validator_1.IsString)(),
|
|
19
|
-
__metadata("design:type", String)
|
|
20
|
-
], CreateCategoryValidator.prototype, "name", void 0);
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, class_validator_1.IsString)(),
|
|
23
|
-
(0, class_validator_1.IsOptional)(),
|
|
24
|
-
__metadata("design:type", String)
|
|
25
|
-
], CreateCategoryValidator.prototype, "description", void 0);
|
|
26
|
-
return CreateCategoryValidator;
|
|
27
|
-
}());
|
|
28
|
-
var UpdateCategoryValidator = exports.UpdateCategoryValidator = (function () {
|
|
29
|
-
function UpdateCategoryValidator() {
|
|
30
|
-
}
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, class_validator_1.IsString)(),
|
|
33
|
-
(0, class_validator_1.IsOptional)(),
|
|
34
|
-
__metadata("design:type", String)
|
|
35
|
-
], UpdateCategoryValidator.prototype, "name", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, class_validator_1.IsString)(),
|
|
38
|
-
(0, class_validator_1.IsOptional)(),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], UpdateCategoryValidator.prototype, "description", void 0);
|
|
41
|
-
return UpdateCategoryValidator;
|
|
42
|
-
}());
|
|
@@ -1,33 +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.ProductAttributesDocument = void 0;
|
|
13
|
-
var mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
-
var mongoose_2 = require("mongoose");
|
|
15
|
-
var ProductAttributesDocument = exports.ProductAttributesDocument = (function () {
|
|
16
|
-
function ProductAttributesDocument() {
|
|
17
|
-
this.units = 1;
|
|
18
|
-
this.stock = null;
|
|
19
|
-
}
|
|
20
|
-
__decorate([
|
|
21
|
-
(0, mongoose_1.Prop)({ default: function () { return 1; }, type: mongoose_2.Schema.Types.Number }),
|
|
22
|
-
__metadata("design:type", Object)
|
|
23
|
-
], ProductAttributesDocument.prototype, "units", void 0);
|
|
24
|
-
__decorate([
|
|
25
|
-
(0, mongoose_1.Prop)({ default: function () { return null; }, type: mongoose_2.Schema.Types.Number }),
|
|
26
|
-
__metadata("design:type", Number)
|
|
27
|
-
], ProductAttributesDocument.prototype, "stock", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, mongoose_1.Prop)({ default: function () { return undefined; }, required: true, type: mongoose_2.Schema.Types.String, unique: true }),
|
|
30
|
-
__metadata("design:type", String)
|
|
31
|
-
], ProductAttributesDocument.prototype, "sku", void 0);
|
|
32
|
-
return ProductAttributesDocument;
|
|
33
|
-
}());
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
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.ProductDimensionDocument = void 0;
|
|
13
|
-
var mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
-
var mongoose_2 = require("mongoose");
|
|
15
|
-
var ProductDimensionDocument = exports.ProductDimensionDocument = (function () {
|
|
16
|
-
function ProductDimensionDocument() {
|
|
17
|
-
}
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number }),
|
|
20
|
-
__metadata("design:type", Number)
|
|
21
|
-
], ProductDimensionDocument.prototype, "weight", void 0);
|
|
22
|
-
__decorate([
|
|
23
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number }),
|
|
24
|
-
__metadata("design:type", Number)
|
|
25
|
-
], ProductDimensionDocument.prototype, "height", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number }),
|
|
28
|
-
__metadata("design:type", Number)
|
|
29
|
-
], ProductDimensionDocument.prototype, "width", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number }),
|
|
32
|
-
__metadata("design:type", Number)
|
|
33
|
-
], ProductDimensionDocument.prototype, "depth", void 0);
|
|
34
|
-
return ProductDimensionDocument;
|
|
35
|
-
}());
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { AbstractEntity, MaybeEntity } from '../../../abstracts/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 { ProductAttributesDocument } from './documents/attribute.document';
|
|
6
|
-
import { ProductDimensionDocument } from './documents/dimension.document';
|
|
7
|
-
export declare class ProductEntity extends AbstractEntity {
|
|
8
|
-
name: string;
|
|
9
|
-
description: string;
|
|
10
|
-
active: boolean;
|
|
11
|
-
price: number;
|
|
12
|
-
hashtags: string[];
|
|
13
|
-
brand?: MaybeEntity<BrandEntity>;
|
|
14
|
-
category?: MaybeEntity<CategoryEntity>;
|
|
15
|
-
pictures: FileEntity[];
|
|
16
|
-
attributes: ProductAttributesDocument;
|
|
17
|
-
dimension: ProductDimensionDocument;
|
|
18
|
-
readonly image: string;
|
|
19
|
-
}
|
|
@@ -1,34 +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 { ProductEntity } from './product.entity';
|
|
27
|
-
export declare namespace ProductSchema {
|
|
28
|
-
const name = "inventory_products";
|
|
29
|
-
const schema: import("mongoose").Schema<ProductEntity, import("mongoose").Model<ProductEntity, any, any, any, import("mongoose").Document<unknown, any, ProductEntity> & ProductEntity & Required<{
|
|
30
|
-
_id: string;
|
|
31
|
-
}>, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ProductEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<ProductEntity>> & import("mongoose").FlatRecord<ProductEntity> & Required<{
|
|
32
|
-
_id: string;
|
|
33
|
-
}>>;
|
|
34
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProductSchema = void 0;
|
|
4
|
-
var mongoose_1 = require("@nestjs/mongoose");
|
|
5
|
-
var product_entity_1 = require("./product.entity");
|
|
6
|
-
var ProductSchema;
|
|
7
|
-
(function (ProductSchema) {
|
|
8
|
-
ProductSchema.name = 'inventory_products';
|
|
9
|
-
ProductSchema.schema = mongoose_1.SchemaFactory.createForClass(product_entity_1.ProductEntity);
|
|
10
|
-
ProductSchema.schema.index({
|
|
11
|
-
description: 'text',
|
|
12
|
-
name: 'text',
|
|
13
|
-
});
|
|
14
|
-
ProductSchema.schema.virtual('image').get(function () {
|
|
15
|
-
var first = this.pictures[0];
|
|
16
|
-
return first === null || first === void 0 ? void 0 : first.url;
|
|
17
|
-
});
|
|
18
|
-
})(ProductSchema || (exports.ProductSchema = ProductSchema = {}));
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { AbstractValidator } from '../../../abstracts/abstract.validator';
|
|
2
|
-
import { ProductEntity } from './product.entity';
|
|
3
|
-
import { AttributesValidator } from './validators/attributes.validator';
|
|
4
|
-
import { DimensionValidator } from './validators/dimension.validator';
|
|
5
|
-
export declare class CreateProductValidator extends AbstractValidator {
|
|
6
|
-
active?: boolean;
|
|
7
|
-
hashtags?: string[];
|
|
8
|
-
name: string;
|
|
9
|
-
description: string;
|
|
10
|
-
price: number;
|
|
11
|
-
pictures: string[];
|
|
12
|
-
category?: string;
|
|
13
|
-
brand?: string;
|
|
14
|
-
dimension: DimensionValidator;
|
|
15
|
-
attributes: AttributesValidator;
|
|
16
|
-
}
|
|
17
|
-
export declare class UpdateProductValidator {
|
|
18
|
-
active?: boolean;
|
|
19
|
-
hashtags: string[];
|
|
20
|
-
name?: string;
|
|
21
|
-
description?: string;
|
|
22
|
-
price?: number;
|
|
23
|
-
category?: string;
|
|
24
|
-
brand?: string;
|
|
25
|
-
pictures: string[];
|
|
26
|
-
dimension: DimensionValidator;
|
|
27
|
-
attributes: AttributesValidator;
|
|
28
|
-
constructor(entity: ProductEntity);
|
|
29
|
-
}
|
|
@@ -1,181 +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.UpdateProductValidator = exports.CreateProductValidator = void 0;
|
|
28
|
-
var class_transformer_1 = require("class-transformer");
|
|
29
|
-
var class_validator_1 = require("class-validator");
|
|
30
|
-
var abstract_validator_1 = require("../../../abstracts/abstract.validator");
|
|
31
|
-
var attributes_validator_1 = require("./validators/attributes.validator");
|
|
32
|
-
var dimension_validator_1 = require("./validators/dimension.validator");
|
|
33
|
-
var CreateProductValidator = exports.CreateProductValidator = (function (_super) {
|
|
34
|
-
__extends(CreateProductValidator, _super);
|
|
35
|
-
function CreateProductValidator() {
|
|
36
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
37
|
-
_this.active = true;
|
|
38
|
-
_this.hashtags = [];
|
|
39
|
-
_this.pictures = [];
|
|
40
|
-
_this.dimension = new dimension_validator_1.DimensionValidator();
|
|
41
|
-
_this.attributes = new attributes_validator_1.AttributesValidator();
|
|
42
|
-
return _this;
|
|
43
|
-
}
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, class_validator_1.IsBoolean)(),
|
|
46
|
-
(0, class_validator_1.IsOptional)(),
|
|
47
|
-
__metadata("design:type", Object)
|
|
48
|
-
], CreateProductValidator.prototype, "active", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
51
|
-
(0, class_validator_1.IsNotEmpty)({ each: true }),
|
|
52
|
-
(0, class_validator_1.IsOptional)(),
|
|
53
|
-
__metadata("design:type", Array)
|
|
54
|
-
], CreateProductValidator.prototype, "hashtags", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, class_validator_1.IsString)(),
|
|
57
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
58
|
-
__metadata("design:type", String)
|
|
59
|
-
], CreateProductValidator.prototype, "name", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, class_validator_1.IsString)(),
|
|
62
|
-
(0, class_validator_1.IsOptional)(),
|
|
63
|
-
__metadata("design:type", String)
|
|
64
|
-
], CreateProductValidator.prototype, "description", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
(0, class_validator_1.IsNumber)(),
|
|
67
|
-
(0, class_validator_1.IsPositive)(),
|
|
68
|
-
__metadata("design:type", Number)
|
|
69
|
-
], CreateProductValidator.prototype, "price", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
(0, class_validator_1.IsMongoId)({ each: true }),
|
|
72
|
-
(0, class_validator_1.IsArray)(),
|
|
73
|
-
(0, class_validator_1.IsOptional)(),
|
|
74
|
-
__metadata("design:type", Array)
|
|
75
|
-
], CreateProductValidator.prototype, "pictures", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
(0, class_validator_1.IsOptional)(),
|
|
78
|
-
(0, class_validator_1.IsMongoId)(),
|
|
79
|
-
__metadata("design:type", String)
|
|
80
|
-
], CreateProductValidator.prototype, "category", void 0);
|
|
81
|
-
__decorate([
|
|
82
|
-
(0, class_validator_1.IsOptional)(),
|
|
83
|
-
(0, class_validator_1.IsMongoId)(),
|
|
84
|
-
__metadata("design:type", String)
|
|
85
|
-
], CreateProductValidator.prototype, "brand", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
(0, class_transformer_1.Type)(function () { return dimension_validator_1.DimensionValidator; }),
|
|
88
|
-
(0, class_validator_1.ValidateNested)(),
|
|
89
|
-
(0, class_validator_1.IsOptional)(),
|
|
90
|
-
__metadata("design:type", Object)
|
|
91
|
-
], CreateProductValidator.prototype, "dimension", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
(0, class_transformer_1.Type)(function () { return attributes_validator_1.AttributesValidator; }),
|
|
94
|
-
(0, class_validator_1.ValidateNested)(),
|
|
95
|
-
(0, class_validator_1.IsOptional)(),
|
|
96
|
-
__metadata("design:type", Object)
|
|
97
|
-
], CreateProductValidator.prototype, "attributes", void 0);
|
|
98
|
-
return CreateProductValidator;
|
|
99
|
-
}(abstract_validator_1.AbstractValidator));
|
|
100
|
-
var UpdateProductValidator = exports.UpdateProductValidator = (function () {
|
|
101
|
-
function UpdateProductValidator(entity) {
|
|
102
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
103
|
-
this.hashtags = [];
|
|
104
|
-
this.pictures = [];
|
|
105
|
-
this.attributes = new attributes_validator_1.AttributesValidator();
|
|
106
|
-
this.active = entity.active;
|
|
107
|
-
this.name = entity.name;
|
|
108
|
-
this.description = entity.description;
|
|
109
|
-
this.price = entity.price;
|
|
110
|
-
this.hashtags = entity.hashtags;
|
|
111
|
-
this.category = (_a = entity.category) === null || _a === void 0 ? void 0 : _a._id;
|
|
112
|
-
this.brand = (_b = entity.brand) === null || _b === void 0 ? void 0 : _b._id;
|
|
113
|
-
this.pictures = entity.pictures.map(function (file) { return file._id; });
|
|
114
|
-
this.attributes = new attributes_validator_1.AttributesValidator();
|
|
115
|
-
this.attributes.sku = (_c = entity.attributes) === null || _c === void 0 ? void 0 : _c.sku;
|
|
116
|
-
this.attributes.stock = (_d = entity.attributes) === null || _d === void 0 ? void 0 : _d.stock;
|
|
117
|
-
this.attributes.units = (_e = entity.attributes) === null || _e === void 0 ? void 0 : _e.units;
|
|
118
|
-
this.dimension = new dimension_validator_1.DimensionValidator();
|
|
119
|
-
this.dimension.depth = (_f = entity.dimension) === null || _f === void 0 ? void 0 : _f.depth;
|
|
120
|
-
this.dimension.height = (_g = entity.dimension) === null || _g === void 0 ? void 0 : _g.height;
|
|
121
|
-
this.dimension.weight = (_h = entity.dimension) === null || _h === void 0 ? void 0 : _h.weight;
|
|
122
|
-
this.dimension.width = (_j = entity.dimension) === null || _j === void 0 ? void 0 : _j.width;
|
|
123
|
-
}
|
|
124
|
-
__decorate([
|
|
125
|
-
(0, class_validator_1.IsBoolean)(),
|
|
126
|
-
(0, class_validator_1.IsOptional)(),
|
|
127
|
-
__metadata("design:type", Boolean)
|
|
128
|
-
], UpdateProductValidator.prototype, "active", void 0);
|
|
129
|
-
__decorate([
|
|
130
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
131
|
-
(0, class_validator_1.IsNotEmpty)({ each: true }),
|
|
132
|
-
(0, class_validator_1.IsOptional)(),
|
|
133
|
-
__metadata("design:type", Array)
|
|
134
|
-
], UpdateProductValidator.prototype, "hashtags", void 0);
|
|
135
|
-
__decorate([
|
|
136
|
-
(0, class_validator_1.IsOptional)(),
|
|
137
|
-
(0, class_validator_1.IsString)(),
|
|
138
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
139
|
-
__metadata("design:type", String)
|
|
140
|
-
], UpdateProductValidator.prototype, "name", void 0);
|
|
141
|
-
__decorate([
|
|
142
|
-
(0, class_validator_1.IsOptional)(),
|
|
143
|
-
(0, class_validator_1.IsString)(),
|
|
144
|
-
(0, class_validator_1.IsOptional)(),
|
|
145
|
-
__metadata("design:type", String)
|
|
146
|
-
], UpdateProductValidator.prototype, "description", void 0);
|
|
147
|
-
__decorate([
|
|
148
|
-
(0, class_validator_1.IsOptional)(),
|
|
149
|
-
(0, class_validator_1.IsNumber)(),
|
|
150
|
-
__metadata("design:type", Number)
|
|
151
|
-
], UpdateProductValidator.prototype, "price", void 0);
|
|
152
|
-
__decorate([
|
|
153
|
-
(0, class_validator_1.IsOptional)(),
|
|
154
|
-
(0, class_validator_1.IsMongoId)(),
|
|
155
|
-
__metadata("design:type", String)
|
|
156
|
-
], UpdateProductValidator.prototype, "category", void 0);
|
|
157
|
-
__decorate([
|
|
158
|
-
(0, class_validator_1.IsOptional)(),
|
|
159
|
-
(0, class_validator_1.IsMongoId)(),
|
|
160
|
-
__metadata("design:type", String)
|
|
161
|
-
], UpdateProductValidator.prototype, "brand", void 0);
|
|
162
|
-
__decorate([
|
|
163
|
-
(0, class_validator_1.IsMongoId)({ each: true }),
|
|
164
|
-
(0, class_validator_1.IsArray)(),
|
|
165
|
-
(0, class_validator_1.IsOptional)(),
|
|
166
|
-
__metadata("design:type", Array)
|
|
167
|
-
], UpdateProductValidator.prototype, "pictures", void 0);
|
|
168
|
-
__decorate([
|
|
169
|
-
(0, class_transformer_1.Type)(function () { return dimension_validator_1.DimensionValidator; }),
|
|
170
|
-
(0, class_validator_1.ValidateNested)(),
|
|
171
|
-
(0, class_validator_1.IsOptional)(),
|
|
172
|
-
__metadata("design:type", dimension_validator_1.DimensionValidator)
|
|
173
|
-
], UpdateProductValidator.prototype, "dimension", void 0);
|
|
174
|
-
__decorate([
|
|
175
|
-
(0, class_transformer_1.Type)(function () { return attributes_validator_1.AttributesValidator; }),
|
|
176
|
-
(0, class_validator_1.ValidateNested)(),
|
|
177
|
-
(0, class_validator_1.IsOptional)(),
|
|
178
|
-
__metadata("design:type", attributes_validator_1.AttributesValidator)
|
|
179
|
-
], UpdateProductValidator.prototype, "attributes", void 0);
|
|
180
|
-
return UpdateProductValidator;
|
|
181
|
-
}());
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
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.AttributesValidator = void 0;
|
|
13
|
-
var class_validator_1 = require("class-validator");
|
|
14
|
-
var AttributesValidator = exports.AttributesValidator = (function () {
|
|
15
|
-
function AttributesValidator() {
|
|
16
|
-
this.units = 1;
|
|
17
|
-
this.stock = null;
|
|
18
|
-
}
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, class_validator_1.IsPositive)(),
|
|
21
|
-
__metadata("design:type", Object)
|
|
22
|
-
], AttributesValidator.prototype, "units", void 0);
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, class_validator_1.IsNumber)(),
|
|
25
|
-
(0, class_validator_1.IsOptional)(),
|
|
26
|
-
__metadata("design:type", Number)
|
|
27
|
-
], AttributesValidator.prototype, "stock", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, class_validator_1.IsString)(),
|
|
30
|
-
(0, class_validator_1.IsOptional)(),
|
|
31
|
-
(0, class_validator_1.IsOptional)(),
|
|
32
|
-
__metadata("design:type", String)
|
|
33
|
-
], AttributesValidator.prototype, "sku", void 0);
|
|
34
|
-
return AttributesValidator;
|
|
35
|
-
}());
|