@merkaly/api 0.2.5-6 → 0.2.5-7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/abstracts/abstract.entity.d.ts +14 -0
- package/.output/abstracts/abstract.validator.d.ts +24 -0
- package/.output/abstracts/abstract.validator.js +118 -0
- package/.output/exceptions/missing-identity.exception.d.ts +5 -0
- package/.output/exceptions/missing-identity.exception.js +30 -0
- package/.output/modules/asset/files/file.entity.d.ts +9 -0
- package/.output/modules/asset/files/file.schema.d.ts +34 -0
- package/.output/modules/asset/files/file.schema.js +10 -0
- package/.output/modules/auth/organizations/organization.entity.d.ts +8 -0
- package/.output/modules/auth/users/user.entity.d.ts +9 -0
- package/.output/modules/auth/users/user.schema.d.ts +34 -0
- package/.output/modules/auth/users/user.schema.js +10 -0
- package/.output/modules/auth/users/user.validator.d.ts +12 -0
- package/.output/modules/auth/users/user.validator.js +58 -0
- package/.output/modules/inventory/brands/brand.entity.d.ts +6 -0
- package/.output/modules/inventory/brands/brand.schema.d.ts +34 -0
- package/.output/modules/inventory/brands/brand.schema.js +10 -0
- package/.output/modules/inventory/brands/brand.validator.d.ts +11 -0
- package/.output/modules/inventory/brands/brand.validator.js +74 -0
- package/.output/modules/inventory/categories/category.entity.d.ts +6 -0
- package/.output/modules/inventory/categories/category.schema.d.ts +34 -0
- package/.output/modules/inventory/categories/category.schema.js +10 -0
- package/.output/modules/inventory/categories/category.validator.d.ts +8 -0
- package/.output/modules/inventory/categories/category.validator.js +42 -0
- package/.output/modules/inventory/complements/complement.entity.d.ts +6 -0
- package/.output/modules/inventory/complements/complement.validator.d.ts +10 -0
- package/.output/modules/inventory/complements/complement.validator.js +52 -0
- package/.output/modules/inventory/products/documents/attribute.document.d.ts +5 -0
- package/.output/modules/inventory/products/documents/attribute.document.js +33 -0
- package/.output/modules/inventory/products/documents/dimension.document.d.ts +6 -0
- package/.output/modules/inventory/products/documents/dimension.document.js +35 -0
- package/.output/modules/inventory/products/product.entity.d.ts +19 -0
- package/.output/modules/inventory/products/product.schema.d.ts +34 -0
- package/.output/modules/inventory/products/product.schema.js +18 -0
- package/.output/modules/inventory/products/product.validator.d.ts +29 -0
- package/.output/modules/inventory/products/product.validator.js +179 -0
- package/.output/modules/inventory/products/validators/attributes.validator.d.ts +5 -0
- package/.output/modules/inventory/products/validators/attributes.validator.js +35 -0
- package/.output/modules/inventory/products/validators/dimension.validator.d.ts +6 -0
- package/.output/modules/inventory/products/validators/dimension.validator.js +38 -0
- package/.output/modules/sale/customers/customer.entity.d.ts +8 -0
- package/.output/modules/sale/customers/customer.schema.d.ts +34 -0
- package/.output/modules/sale/customers/customer.schema.js +10 -0
- package/.output/modules/sale/customers/customer.validator.d.ts +14 -0
- package/.output/modules/sale/customers/customer.validator.js +94 -0
- package/.output/modules/sale/orders/documents/address.document.d.ts +8 -0
- package/.output/modules/sale/orders/documents/address.document.js +43 -0
- package/.output/modules/sale/orders/documents/status.document.d.ts +8 -0
- package/.output/modules/sale/orders/documents/status.document.js +34 -0
- package/.output/modules/sale/orders/entities/item.entity.d.ts +38 -0
- package/.output/modules/sale/orders/enums/order.status.d.ts +6 -0
- package/.output/modules/sale/orders/enums/order.status.js +10 -0
- package/.output/modules/sale/orders/order.entity.d.ts +21 -0
- package/.output/modules/sale/orders/order.validator.d.ts +16 -0
- package/.output/modules/sale/orders/order.validator.js +86 -0
- package/.output/modules/sale/orders/validators/address.validator.d.ts +17 -0
- package/.output/modules/sale/orders/validators/address.validator.js +81 -0
- package/{src/modules/sale/orders/validators/billing.validator.ts → .output/modules/sale/orders/validators/billing.validator.d.ts} +4 -7
- package/.output/modules/sale/orders/validators/billing.validator.js +13 -0
- package/.output/modules/sale/orders/validators/item.validator.d.ts +5 -0
- package/.output/modules/sale/orders/validators/item.validator.js +32 -0
- package/.output/modules/sale/orders/validators/payment.validator.d.ts +10 -0
- package/.output/modules/sale/orders/validators/payment.validator.js +62 -0
- package/.output/modules/sale/orders/validators/shipping.validator.d.ts +9 -0
- package/.output/modules/sale/orders/validators/shipping.validator.js +14 -0
- package/.output/modules/sale/payments/entities/status.entity.d.ts +8 -0
- package/.output/modules/sale/payments/enums/billing.type.d.ts +6 -0
- package/.output/modules/sale/payments/enums/billing.type.js +10 -0
- package/.output/modules/sale/payments/enums/payment.status.d.ts +7 -0
- package/.output/modules/sale/payments/enums/payment.status.js +11 -0
- package/.output/modules/sale/payments/enums/shipping.type.d.ts +4 -0
- package/.output/modules/sale/payments/enums/shipping.type.js +8 -0
- package/.output/modules/sale/payments/payment.entity.d.ts +12 -0
- package/.output/modules/sale/payments/payment.schema.d.ts +34 -0
- package/.output/modules/sale/payments/payment.schema.js +14 -0
- package/.output/modules/sale/payments/payment.validator.d.ts +16 -0
- package/.output/modules/sale/payments/payment.validator.js +77 -0
- package/.output/tsconfig.package.tsbuildinfo +1 -0
- package/package.json +4 -1
- package/.bin/deploy.sh +0 -9
- package/.bin/package.sh +0 -12
- package/.docker/Dockerfile +0 -21
- package/.dockerignore +0 -12
- package/.github/dependabot.yml +0 -17
- package/.github/semantic.yml +0 -5
- package/.github/workflows/pull_request.yml +0 -35
- package/.prettierrc +0 -5
- package/app.ts +0 -11
- package/authCertificate.pem +0 -19
- package/nest-cli.json +0 -8
- package/src/abstracts/abstarct.repository.ts +0 -62
- package/src/abstracts/abstract.controller.ts +0 -18
- package/src/abstracts/abstract.entity.ts +0 -22
- package/src/abstracts/abstract.router.ts +0 -7
- package/src/abstracts/abstract.validator.ts +0 -61
- package/src/app.config.ts +0 -59
- package/src/app.console.ts +0 -24
- package/src/app.guard.ts +0 -39
- package/src/app.module.ts +0 -54
- package/src/app.strategy.ts +0 -21
- package/src/commands/seed.command.ts +0 -263
- package/src/decorators/public.decorator.ts +0 -5
- package/src/decorators/user.decorator.ts +0 -30
- package/src/exceptions/missing-identity.exception.ts +0 -11
- package/src/interceptors/mongoose.interceptor.ts +0 -63
- package/src/main.ts +0 -27
- package/src/middlewares/router.middleware.ts +0 -14
- package/src/modules/asset/asset.module.ts +0 -19
- package/src/modules/asset/files/file.controller.ts +0 -22
- package/src/modules/asset/files/file.entity.ts +0 -24
- package/src/modules/asset/files/file.module.ts +0 -21
- package/src/modules/asset/files/file.repository.ts +0 -44
- package/src/modules/asset/files/file.schema.ts +0 -8
- package/src/modules/asset/files/file.service.ts +0 -4
- package/src/modules/auth/auth.controller.ts +0 -57
- package/src/modules/auth/auth.module.ts +0 -20
- package/src/modules/auth/organizations/organization.controller.ts +0 -20
- package/src/modules/auth/organizations/organization.entity.ts +0 -22
- package/src/modules/auth/organizations/organization.module.ts +0 -21
- package/src/modules/auth/organizations/organization.repository.ts +0 -16
- package/src/modules/auth/organizations/organization.schema.ts +0 -8
- package/src/modules/auth/users/user.controller.ts +0 -23
- package/src/modules/auth/users/user.entity.ts +0 -25
- package/src/modules/auth/users/user.module.ts +0 -20
- package/src/modules/auth/users/user.repository.ts +0 -79
- package/src/modules/auth/users/user.schema.ts +0 -8
- package/src/modules/auth/users/user.validator.ts +0 -32
- package/src/modules/command.module.ts +0 -15
- package/src/modules/global.module.ts +0 -46
- package/src/modules/inventory/brands/brand.controller.ts +0 -44
- package/src/modules/inventory/brands/brand.entity.ts +0 -20
- package/src/modules/inventory/brands/brand.module.ts +0 -20
- package/src/modules/inventory/brands/brand.repository.ts +0 -40
- package/src/modules/inventory/brands/brand.schema.ts +0 -8
- package/src/modules/inventory/brands/brand.validator.ts +0 -31
- package/src/modules/inventory/categories/category.controller.ts +0 -42
- package/src/modules/inventory/categories/category.entity.ts +0 -15
- package/src/modules/inventory/categories/category.module.ts +0 -19
- package/src/modules/inventory/categories/category.repository.ts +0 -34
- package/src/modules/inventory/categories/category.schema.ts +0 -8
- package/src/modules/inventory/categories/category.validator.ts +0 -20
- package/src/modules/inventory/complements/complement.controller.ts +0 -41
- package/src/modules/inventory/complements/complement.entity.ts +0 -15
- package/src/modules/inventory/complements/complement.module.ts +0 -19
- package/src/modules/inventory/complements/complement.repository.ts +0 -37
- package/src/modules/inventory/complements/complement.schema.ts +0 -8
- package/src/modules/inventory/complements/complement.validator.ts +0 -28
- package/src/modules/inventory/inventory.module.ts +0 -23
- package/src/modules/inventory/products/documents/attribute.document.ts +0 -14
- package/src/modules/inventory/products/documents/dimension.document.ts +0 -16
- package/src/modules/inventory/products/product.controller.ts +0 -62
- package/src/modules/inventory/products/product.entity.ts +0 -46
- package/src/modules/inventory/products/product.module.ts +0 -19
- package/src/modules/inventory/products/product.repository.ts +0 -64
- package/src/modules/inventory/products/product.schema.ts +0 -19
- package/src/modules/inventory/products/product.validator.ts +0 -132
- package/src/modules/inventory/products/validators/attributes.validator.ts +0 -15
- package/src/modules/inventory/products/validators/dimension.validator.ts +0 -19
- package/src/modules/sale/customers/customer.controller.ts +0 -41
- package/src/modules/sale/customers/customer.entity.ts +0 -19
- package/src/modules/sale/customers/customer.module.ts +0 -18
- package/src/modules/sale/customers/customer.repository.ts +0 -30
- package/src/modules/sale/customers/customer.schema.ts +0 -8
- package/src/modules/sale/customers/customer.validator.ts +0 -43
- package/src/modules/sale/orders/documents/address.document.ts +0 -22
- package/src/modules/sale/orders/documents/status.document.ts +0 -17
- package/src/modules/sale/orders/entities/item.entity.ts +0 -24
- package/src/modules/sale/orders/enums/order.status.ts +0 -6
- package/src/modules/sale/orders/order.controller.ts +0 -65
- package/src/modules/sale/orders/order.entity.ts +0 -46
- package/src/modules/sale/orders/order.module.ts +0 -22
- package/src/modules/sale/orders/order.repository.ts +0 -122
- package/src/modules/sale/orders/order.schema.ts +0 -36
- package/src/modules/sale/orders/order.validator.ts +0 -44
- package/src/modules/sale/orders/validators/address.validator.ts +0 -50
- package/src/modules/sale/orders/validators/item.validator.ts +0 -14
- package/src/modules/sale/orders/validators/payment.validator.ts +0 -44
- package/src/modules/sale/orders/validators/shipping.validator.ts +0 -14
- package/src/modules/sale/payments/entities/status.entity.ts +0 -17
- package/src/modules/sale/payments/enums/billing.type.ts +0 -6
- package/src/modules/sale/payments/enums/payment.status.ts +0 -7
- package/src/modules/sale/payments/enums/shipping.type.ts +0 -4
- package/src/modules/sale/payments/payment.controller.ts +0 -45
- package/src/modules/sale/payments/payment.entity.ts +0 -25
- package/src/modules/sale/payments/payment.module.ts +0 -20
- package/src/modules/sale/payments/payment.repository.ts +0 -57
- package/src/modules/sale/payments/payment.schema.ts +0 -14
- package/src/modules/sale/payments/payment.validator.ts +0 -32
- package/src/modules/sale/sale.module.ts +0 -20
- package/src/services/auth0.service.ts +0 -49
- package/src/services/mongo.service.ts +0 -52
- package/test/auth/auth.spec.ts +0 -20
- package/test/main.ts +0 -12
- package/tsconfig.build.json +0 -4
- package/tsconfig.json +0 -21
- package/tsconfig.package.json +0 -22
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const $collection: {
|
|
2
|
+
timestamps: boolean;
|
|
3
|
+
toJSON: {
|
|
4
|
+
versionKey: boolean;
|
|
5
|
+
virtuals: boolean;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export type MaybeEntity<T extends AbstractEntity> = T;
|
|
9
|
+
export declare abstract class AbstractEntity {
|
|
10
|
+
readonly _id: string;
|
|
11
|
+
readonly createdAt: Date;
|
|
12
|
+
readonly updatedAt?: Date;
|
|
13
|
+
readonly deletedAt?: Date;
|
|
14
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FilterQuery, PopulateOptions, SortOrder } from 'mongoose';
|
|
2
|
+
import { AbstractEntity } from './abstract.entity';
|
|
3
|
+
export declare abstract class AbstractValidator {
|
|
4
|
+
}
|
|
5
|
+
export type FindResult<I> = {
|
|
6
|
+
items: I[];
|
|
7
|
+
page: number;
|
|
8
|
+
total: number;
|
|
9
|
+
};
|
|
10
|
+
export type KeyOfType<T, V> = keyof {
|
|
11
|
+
[P in keyof T as T[P] extends V ? P : string]: any;
|
|
12
|
+
};
|
|
13
|
+
export declare class IdMongoValidator {
|
|
14
|
+
id: string;
|
|
15
|
+
}
|
|
16
|
+
export declare class ReadValidator<E = AbstractEntity> extends AbstractValidator {
|
|
17
|
+
join?: (PopulateOptions | KeyOfType<E, AbstractEntity | AbstractEntity[]>)[];
|
|
18
|
+
}
|
|
19
|
+
export declare class FindValidator<E = AbstractEntity> extends ReadValidator<E> {
|
|
20
|
+
limit?: number;
|
|
21
|
+
page?: number;
|
|
22
|
+
sort?: Partial<Record<keyof E, SortOrder>>;
|
|
23
|
+
filters?: FilterQuery<E>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
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.FindValidator = exports.ReadValidator = exports.IdMongoValidator = exports.AbstractValidator = void 0;
|
|
28
|
+
var class_transformer_1 = require("class-transformer");
|
|
29
|
+
var class_validator_1 = require("class-validator");
|
|
30
|
+
var AbstractValidator = (function () {
|
|
31
|
+
function AbstractValidator() {
|
|
32
|
+
}
|
|
33
|
+
return AbstractValidator;
|
|
34
|
+
}());
|
|
35
|
+
exports.AbstractValidator = AbstractValidator;
|
|
36
|
+
var IdMongoValidator = exports.IdMongoValidator = (function () {
|
|
37
|
+
function IdMongoValidator() {
|
|
38
|
+
}
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsMongoId)(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], IdMongoValidator.prototype, "id", void 0);
|
|
43
|
+
return IdMongoValidator;
|
|
44
|
+
}());
|
|
45
|
+
var ReadValidator = exports.ReadValidator = (function (_super) {
|
|
46
|
+
__extends(ReadValidator, _super);
|
|
47
|
+
function ReadValidator() {
|
|
48
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
49
|
+
_this.join = [];
|
|
50
|
+
return _this;
|
|
51
|
+
}
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
54
|
+
var value = _a.value;
|
|
55
|
+
try {
|
|
56
|
+
return JSON.parse(value);
|
|
57
|
+
}
|
|
58
|
+
catch (e) {
|
|
59
|
+
return value;
|
|
60
|
+
}
|
|
61
|
+
}),
|
|
62
|
+
(0, class_validator_1.IsOptional)(),
|
|
63
|
+
__metadata("design:type", Array)
|
|
64
|
+
], ReadValidator.prototype, "join", void 0);
|
|
65
|
+
return ReadValidator;
|
|
66
|
+
}(AbstractValidator));
|
|
67
|
+
var FindValidator = exports.FindValidator = (function (_super) {
|
|
68
|
+
__extends(FindValidator, _super);
|
|
69
|
+
function FindValidator() {
|
|
70
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
71
|
+
_this.limit = 10;
|
|
72
|
+
_this.page = 1;
|
|
73
|
+
_this.sort = {};
|
|
74
|
+
_this.filters = {};
|
|
75
|
+
return _this;
|
|
76
|
+
}
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
79
|
+
var value = _a.value;
|
|
80
|
+
return (value ? Number(value) : 10);
|
|
81
|
+
}),
|
|
82
|
+
(0, class_validator_1.IsInt)(),
|
|
83
|
+
(0, class_validator_1.IsOptional)(),
|
|
84
|
+
__metadata("design:type", Object)
|
|
85
|
+
], FindValidator.prototype, "limit", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
88
|
+
var value = _a.value;
|
|
89
|
+
return (value ? Number(value) : 1);
|
|
90
|
+
}),
|
|
91
|
+
(0, class_validator_1.IsInt)(),
|
|
92
|
+
(0, class_validator_1.IsOptional)(),
|
|
93
|
+
__metadata("design:type", Object)
|
|
94
|
+
], FindValidator.prototype, "page", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
97
|
+
var value = _a.value;
|
|
98
|
+
if ((0, class_validator_1.isObject)(value)) {
|
|
99
|
+
return value;
|
|
100
|
+
}
|
|
101
|
+
return value && JSON.parse(value);
|
|
102
|
+
}),
|
|
103
|
+
(0, class_validator_1.IsOptional)(),
|
|
104
|
+
__metadata("design:type", Object)
|
|
105
|
+
], FindValidator.prototype, "sort", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
108
|
+
var value = _a.value;
|
|
109
|
+
if ((0, class_validator_1.isObject)(value)) {
|
|
110
|
+
return value;
|
|
111
|
+
}
|
|
112
|
+
return value && JSON.parse(value);
|
|
113
|
+
}),
|
|
114
|
+
(0, class_validator_1.IsOptional)(),
|
|
115
|
+
__metadata("design:type", Object)
|
|
116
|
+
], FindValidator.prototype, "filters", void 0);
|
|
117
|
+
return FindValidator;
|
|
118
|
+
}(ReadValidator));
|
|
@@ -0,0 +1,30 @@
|
|
|
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.MissingIdentityException = void 0;
|
|
19
|
+
var common_1 = require("@nestjs/common");
|
|
20
|
+
var MissingIdentityException = (function (_super) {
|
|
21
|
+
__extends(MissingIdentityException, _super);
|
|
22
|
+
function MissingIdentityException() {
|
|
23
|
+
return _super.call(this, 'Missing identity parameter on your request') || this;
|
|
24
|
+
}
|
|
25
|
+
MissingIdentityException.throw = function () {
|
|
26
|
+
throw new MissingIdentityException();
|
|
27
|
+
};
|
|
28
|
+
return MissingIdentityException;
|
|
29
|
+
}(common_1.PreconditionFailedException));
|
|
30
|
+
exports.MissingIdentityException = MissingIdentityException;
|
|
@@ -0,0 +1,34 @@
|
|
|
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 { FileEntity } from './file.entity';
|
|
27
|
+
export declare namespace FileSchema {
|
|
28
|
+
const name = "asset_files";
|
|
29
|
+
const schema: import("mongoose").Schema<FileEntity, import("mongoose").Model<FileEntity, any, any, any, import("mongoose").Document<unknown, any, FileEntity> & FileEntity & Required<{
|
|
30
|
+
_id: string;
|
|
31
|
+
}>, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, FileEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<FileEntity>> & import("mongoose").FlatRecord<FileEntity> & Required<{
|
|
32
|
+
_id: string;
|
|
33
|
+
}>>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileSchema = void 0;
|
|
4
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
5
|
+
var file_entity_1 = require("./file.entity");
|
|
6
|
+
var FileSchema;
|
|
7
|
+
(function (FileSchema) {
|
|
8
|
+
FileSchema.name = 'asset_files';
|
|
9
|
+
FileSchema.schema = mongoose_1.SchemaFactory.createForClass(file_entity_1.FileEntity);
|
|
10
|
+
})(FileSchema || (exports.FileSchema = FileSchema = {}));
|
|
@@ -0,0 +1,34 @@
|
|
|
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 { UserEntity } from './user.entity';
|
|
27
|
+
export declare namespace UserSchema {
|
|
28
|
+
const name = "auth_users";
|
|
29
|
+
const schema: import("mongoose").Schema<UserEntity, import("mongoose").Model<UserEntity, any, any, any, import("mongoose").Document<unknown, any, UserEntity> & UserEntity & Required<{
|
|
30
|
+
_id: string;
|
|
31
|
+
}>, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, UserEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<UserEntity>> & import("mongoose").FlatRecord<UserEntity> & Required<{
|
|
32
|
+
_id: string;
|
|
33
|
+
}>>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserSchema = void 0;
|
|
4
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
5
|
+
var user_entity_1 = require("./user.entity");
|
|
6
|
+
var UserSchema;
|
|
7
|
+
(function (UserSchema) {
|
|
8
|
+
UserSchema.name = 'auth_users';
|
|
9
|
+
UserSchema.schema = mongoose_1.SchemaFactory.createForClass(user_entity_1.UserEntity);
|
|
10
|
+
})(UserSchema || (exports.UserSchema = UserSchema = {}));
|
|
@@ -0,0 +1,58 @@
|
|
|
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.UpdatedUserValidator = exports.CreateUserValidator = void 0;
|
|
13
|
+
var class_validator_1 = require("class-validator");
|
|
14
|
+
var CreateUserValidator = exports.CreateUserValidator = (function () {
|
|
15
|
+
function CreateUserValidator() {
|
|
16
|
+
}
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], CreateUserValidator.prototype, "auth0", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsString)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], CreateUserValidator.prototype, "name", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsEmail)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], CreateUserValidator.prototype, "email", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], CreateUserValidator.prototype, "picture", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsLocale)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], CreateUserValidator.prototype, "locale", void 0);
|
|
37
|
+
return CreateUserValidator;
|
|
38
|
+
}());
|
|
39
|
+
var UpdatedUserValidator = exports.UpdatedUserValidator = (function () {
|
|
40
|
+
function UpdatedUserValidator() {
|
|
41
|
+
}
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsString)(),
|
|
44
|
+
(0, class_validator_1.IsOptional)(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], UpdatedUserValidator.prototype, "name", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_validator_1.IsString)(),
|
|
49
|
+
(0, class_validator_1.IsOptional)(),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], UpdatedUserValidator.prototype, "picture", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_validator_1.IsLocale)(),
|
|
54
|
+
(0, class_validator_1.IsOptional)(),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], UpdatedUserValidator.prototype, "locale", void 0);
|
|
57
|
+
return UpdatedUserValidator;
|
|
58
|
+
}());
|
|
@@ -0,0 +1,34 @@
|
|
|
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 { BrandEntity } from './brand.entity';
|
|
27
|
+
export declare namespace BrandSchema {
|
|
28
|
+
const name = "inventory_brands";
|
|
29
|
+
const schema: import("mongoose").Schema<BrandEntity, import("mongoose").Model<BrandEntity, any, any, any, import("mongoose").Document<unknown, any, BrandEntity> & BrandEntity & Required<{
|
|
30
|
+
_id: string;
|
|
31
|
+
}>, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, BrandEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<BrandEntity>> & import("mongoose").FlatRecord<BrandEntity> & Required<{
|
|
32
|
+
_id: string;
|
|
33
|
+
}>>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BrandSchema = void 0;
|
|
4
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
5
|
+
var brand_entity_1 = require("./brand.entity");
|
|
6
|
+
var BrandSchema;
|
|
7
|
+
(function (BrandSchema) {
|
|
8
|
+
BrandSchema.name = 'inventory_brands';
|
|
9
|
+
BrandSchema.schema = mongoose_1.SchemaFactory.createForClass(brand_entity_1.BrandEntity);
|
|
10
|
+
})(BrandSchema || (exports.BrandSchema = BrandSchema = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
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));
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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 = {}));
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
}());
|