@merkaly/api 0.2.5-5 → 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/{abstract → abstracts}/abstract.validator.d.ts +13 -9
- package/.output/{abstract → abstracts}/abstract.validator.js +36 -23
- package/.output/exceptions/missing-identity.exception.js +1 -1
- package/.output/modules/asset/files/file.entity.d.ts +1 -2
- package/.output/modules/{sale/orders/item/item.schema.d.ts → asset/files/file.schema.d.ts} +9 -2
- 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/{inventory/products/schemas/variant.schema.d.ts → auth/users/user.schema.d.ts} +9 -2
- package/.output/modules/auth/users/user.schema.js +10 -0
- package/.output/modules/auth/users/user.validator.d.ts +11 -9
- package/.output/modules/auth/users/user.validator.js +24 -16
- package/.output/modules/inventory/brands/brand.entity.d.ts +1 -4
- 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 +1 -1
- package/.output/modules/inventory/brands/brand.validator.js +4 -5
- package/.output/modules/inventory/categories/category.entity.d.ts +2 -8
- 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 +2 -7
- package/.output/modules/inventory/categories/category.validator.js +4 -50
- 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/{products/validators/variant.validator.js → complements/complement.validator.js} +27 -24
- package/.output/modules/inventory/products/documents/attribute.document.d.ts +5 -0
- package/.output/modules/{sale/orders/billing/validators/customer.validator.js → inventory/products/documents/attribute.document.js} +15 -18
- package/.output/modules/inventory/products/{entities/dimension.entity.d.ts → documents/dimension.document.d.ts} +1 -1
- package/.output/modules/inventory/products/documents/dimension.document.js +35 -0
- package/.output/modules/inventory/products/product.entity.d.ts +11 -18
- 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 +17 -26
- package/.output/modules/inventory/products/product.validator.js +76 -132
- package/.output/modules/inventory/products/validators/attributes.validator.d.ts +5 -0
- package/.output/modules/inventory/products/validators/{seo.validator.js → attributes.validator.js} +14 -13
- package/.output/modules/inventory/products/validators/dimension.validator.d.ts +5 -5
- package/.output/modules/inventory/products/validators/dimension.validator.js +16 -21
- package/.output/modules/sale/customers/customer.entity.d.ts +7 -11
- 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 +9 -13
- package/.output/modules/sale/customers/customer.validator.js +26 -39
- 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/{shipping/validators/customer.validator.js → documents/status.document.js} +17 -19
- package/.output/modules/sale/orders/entities/item.entity.d.ts +38 -0
- package/.output/modules/sale/orders/{status/status.validator.d.ts → enums/order.status.d.ts} +1 -3
- package/.output/modules/sale/orders/enums/order.status.js +10 -0
- package/.output/modules/sale/orders/order.entity.d.ts +16 -16
- package/.output/modules/sale/orders/order.validator.d.ts +11 -23
- package/.output/modules/sale/orders/order.validator.js +26 -80
- package/.output/modules/sale/orders/validators/address.validator.d.ts +17 -0
- package/.output/modules/sale/orders/validators/address.validator.js +81 -0
- package/.output/modules/sale/orders/validators/billing.validator.d.ts +8 -0
- package/.output/modules/sale/orders/validators/billing.validator.js +13 -0
- package/.output/modules/sale/orders/{item → validators}/item.validator.d.ts +2 -1
- package/.output/modules/sale/orders/{item → validators}/item.validator.js +11 -8
- 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 +69 -78
- package/.output/abstract/abstract.entity.d.ts +0 -9
- package/.output/abstract/abstract.exception.d.ts +0 -11
- package/.output/abstract/abstract.exception.js +0 -53
- package/.output/abstract/abstract.fixture.d.ts +0 -4
- package/.output/abstract/abstract.fixture.js +0 -11
- package/.output/exceptions/store-not-implemented.exception.d.ts +0 -5
- package/.output/exceptions/store-not-implemented.exception.js +0 -31
- package/.output/exceptions/store-not-recognized.exception.d.ts +0 -5
- package/.output/exceptions/store-not-recognized.exception.js +0 -30
- package/.output/modules/auth/auth.types.d.ts +0 -3
- package/.output/modules/auth/auth.types.js +0 -7
- package/.output/modules/config/organization/organization.entity.d.ts +0 -21
- package/.output/modules/config/organization/organization.types.d.ts +0 -23
- package/.output/modules/config/organization/organization.types.js +0 -107
- package/.output/modules/config/organization/organization.validator.d.ts +0 -18
- package/.output/modules/config/organization/organization.validator.js +0 -88
- package/.output/modules/insight/validators/order.validator.d.ts +0 -4
- package/.output/modules/insight/validators/order.validator.js +0 -27
- package/.output/modules/inventory/brands/brand.exception.d.ts +0 -5
- package/.output/modules/inventory/brands/brand.exception.js +0 -40
- package/.output/modules/inventory/categories/category.exception.d.ts +0 -5
- package/.output/modules/inventory/categories/category.exception.js +0 -40
- package/.output/modules/inventory/categories/category.fixture.d.ts +0 -5
- package/.output/modules/inventory/categories/category.fixture.js +0 -38
- package/.output/modules/inventory/products/entities/code.entity.d.ts +0 -5
- package/.output/modules/inventory/products/entities/seo.entity.d.ts +0 -5
- package/.output/modules/inventory/products/entities/variant.entity.d.ts +0 -13
- package/.output/modules/inventory/products/product.exception.d.ts +0 -5
- package/.output/modules/inventory/products/product.exception.js +0 -40
- package/.output/modules/inventory/products/product.fixture.d.ts +0 -5
- package/.output/modules/inventory/products/product.fixture.js +0 -39
- package/.output/modules/inventory/products/schemas/variant.schema.js +0 -6
- package/.output/modules/inventory/products/validators/code.validator.d.ts +0 -5
- package/.output/modules/inventory/products/validators/code.validator.js +0 -37
- package/.output/modules/inventory/products/validators/seo.validator.d.ts +0 -5
- package/.output/modules/inventory/products/validators/variant.validator.d.ts +0 -10
- package/.output/modules/inventory/properties/property.entity.d.ts +0 -8
- package/.output/modules/inventory/properties/property.exception.d.ts +0 -5
- package/.output/modules/inventory/properties/property.exception.js +0 -40
- package/.output/modules/inventory/properties/property.types.d.ts +0 -6
- package/.output/modules/inventory/properties/property.types.js +0 -10
- package/.output/modules/inventory/properties/property.validator.d.ts +0 -12
- package/.output/modules/inventory/properties/property.validator.js +0 -79
- package/.output/modules/layout/pages/page.entity.d.ts +0 -8
- package/.output/modules/layout/pages/page.fixture.d.ts +0 -5
- package/.output/modules/layout/pages/page.fixture.js +0 -36
- package/.output/modules/layout/pages/page.types.d.ts +0 -20
- package/.output/modules/layout/pages/page.types.js +0 -2
- package/.output/modules/layout/pages/page.validator.d.ts +0 -8
- package/.output/modules/layout/pages/page.validator.js +0 -61
- package/.output/modules/sale/customers/customer.exception.d.ts +0 -5
- package/.output/modules/sale/customers/customer.exception.js +0 -40
- package/.output/modules/sale/orders/billing/billing.entity.d.ts +0 -10
- package/.output/modules/sale/orders/billing/billing.types.d.ts +0 -9
- package/.output/modules/sale/orders/billing/billing.types.js +0 -14
- package/.output/modules/sale/orders/billing/billing.validator.d.ts +0 -9
- package/.output/modules/sale/orders/billing/billing.validator.js +0 -42
- package/.output/modules/sale/orders/billing/entities/address.entity.d.ts +0 -10
- package/.output/modules/sale/orders/billing/entities/customer.entity.d.ts +0 -5
- package/.output/modules/sale/orders/billing/entities/status.entity.d.ts +0 -6
- package/.output/modules/sale/orders/billing/validators/address.validator.d.ts +0 -10
- package/.output/modules/sale/orders/billing/validators/address.validator.js +0 -56
- package/.output/modules/sale/orders/billing/validators/customer.validator.d.ts +0 -5
- package/.output/modules/sale/orders/customer/customer.entity.d.ts +0 -5
- package/.output/modules/sale/orders/customer/customer.validator.d.ts +0 -5
- package/.output/modules/sale/orders/customer/customer.validator.js +0 -36
- package/.output/modules/sale/orders/item/item.entity.d.ts +0 -9
- package/.output/modules/sale/orders/item/item.schema.js +0 -9
- package/.output/modules/sale/orders/order.exception.d.ts +0 -13
- package/.output/modules/sale/orders/order.exception.js +0 -46
- package/.output/modules/sale/orders/shipping/entities/address.entity.d.ts +0 -10
- package/.output/modules/sale/orders/shipping/entities/customer.entity.d.ts +0 -5
- package/.output/modules/sale/orders/shipping/entities/status.entity.d.ts +0 -6
- package/.output/modules/sale/orders/shipping/shipping.entity.d.ts +0 -11
- package/.output/modules/sale/orders/shipping/shipping.types.d.ts +0 -11
- package/.output/modules/sale/orders/shipping/shipping.types.js +0 -16
- package/.output/modules/sale/orders/shipping/shipping.validator.d.ts +0 -10
- package/.output/modules/sale/orders/shipping/shipping.validator.js +0 -48
- package/.output/modules/sale/orders/shipping/validators/address.validator.d.ts +0 -10
- package/.output/modules/sale/orders/shipping/validators/address.validator.js +0 -56
- package/.output/modules/sale/orders/shipping/validators/customer.validator.d.ts +0 -5
- package/.output/modules/sale/orders/status/status.entity.d.ts +0 -6
- package/.output/modules/sale/orders/status/status.validator.js +0 -12
- package/.output/services/logger.service.d.ts +0 -11
- package/.output/services/logger.service.js +0 -50
- package/.output/types.d.ts +0 -18
- package/.output/types.js +0 -2
- package/LICENSE +0 -674
|
@@ -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
|
+
}
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import { FilterQuery, PopulateOptions, SortOrder } from 'mongoose';
|
|
2
2
|
import { AbstractEntity } from './abstract.entity';
|
|
3
|
-
import 'reflect-metadata';
|
|
4
|
-
export interface SearchResults<I> {
|
|
5
|
-
page: number;
|
|
6
|
-
total: number;
|
|
7
|
-
items: I[];
|
|
8
|
-
}
|
|
9
3
|
export declare abstract class AbstractValidator {
|
|
10
4
|
}
|
|
11
|
-
export
|
|
5
|
+
export type FindResult<I> = {
|
|
6
|
+
items: I[];
|
|
7
|
+
page: number;
|
|
8
|
+
total: number;
|
|
9
|
+
};
|
|
10
|
+
export type KeyOfType<T, V> = keyof {
|
|
12
11
|
[P in keyof T as T[P] extends V ? P : string]: any;
|
|
13
12
|
};
|
|
14
|
-
export declare class
|
|
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> {
|
|
15
20
|
limit?: number;
|
|
16
21
|
page?: number;
|
|
17
22
|
sort?: Partial<Record<keyof E, SortOrder>>;
|
|
18
23
|
filters?: FilterQuery<E>;
|
|
19
|
-
join?: (PopulateOptions | KeyOfType<E, AbstractEntity | AbstractEntity[]>)[];
|
|
20
24
|
}
|
|
@@ -24,17 +24,47 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
24
24
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
25
|
};
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.FindValidator = exports.AbstractValidator = void 0;
|
|
27
|
+
exports.FindValidator = exports.ReadValidator = exports.IdMongoValidator = exports.AbstractValidator = void 0;
|
|
28
28
|
var class_transformer_1 = require("class-transformer");
|
|
29
29
|
var class_validator_1 = require("class-validator");
|
|
30
|
-
require("reflect-metadata");
|
|
31
30
|
var AbstractValidator = (function () {
|
|
32
31
|
function AbstractValidator() {
|
|
33
32
|
}
|
|
34
33
|
return AbstractValidator;
|
|
35
34
|
}());
|
|
36
35
|
exports.AbstractValidator = AbstractValidator;
|
|
37
|
-
var
|
|
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) {
|
|
38
68
|
__extends(FindValidator, _super);
|
|
39
69
|
function FindValidator() {
|
|
40
70
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -42,13 +72,12 @@ var FindValidator = (function (_super) {
|
|
|
42
72
|
_this.page = 1;
|
|
43
73
|
_this.sort = {};
|
|
44
74
|
_this.filters = {};
|
|
45
|
-
_this.join = [];
|
|
46
75
|
return _this;
|
|
47
76
|
}
|
|
48
77
|
__decorate([
|
|
49
78
|
(0, class_transformer_1.Transform)(function (_a) {
|
|
50
79
|
var value = _a.value;
|
|
51
|
-
return value ? Number(value) : 10;
|
|
80
|
+
return (value ? Number(value) : 10);
|
|
52
81
|
}),
|
|
53
82
|
(0, class_validator_1.IsInt)(),
|
|
54
83
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -57,7 +86,7 @@ var FindValidator = (function (_super) {
|
|
|
57
86
|
__decorate([
|
|
58
87
|
(0, class_transformer_1.Transform)(function (_a) {
|
|
59
88
|
var value = _a.value;
|
|
60
|
-
return value ? Number(value) : 1;
|
|
89
|
+
return (value ? Number(value) : 1);
|
|
61
90
|
}),
|
|
62
91
|
(0, class_validator_1.IsInt)(),
|
|
63
92
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -85,21 +114,5 @@ var FindValidator = (function (_super) {
|
|
|
85
114
|
(0, class_validator_1.IsOptional)(),
|
|
86
115
|
__metadata("design:type", Object)
|
|
87
116
|
], FindValidator.prototype, "filters", void 0);
|
|
88
|
-
__decorate([
|
|
89
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
|
90
|
-
var value = _a.value;
|
|
91
|
-
return value.map(function (path) {
|
|
92
|
-
try {
|
|
93
|
-
return JSON.parse(path);
|
|
94
|
-
}
|
|
95
|
-
catch (e) {
|
|
96
|
-
return path;
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
}),
|
|
100
|
-
(0, class_validator_1.IsOptional)(),
|
|
101
|
-
__metadata("design:type", Array)
|
|
102
|
-
], FindValidator.prototype, "join", void 0);
|
|
103
117
|
return FindValidator;
|
|
104
|
-
}(
|
|
105
|
-
exports.FindValidator = FindValidator;
|
|
118
|
+
}(ReadValidator));
|
|
@@ -23,7 +23,7 @@ var MissingIdentityException = (function (_super) {
|
|
|
23
23
|
return _super.call(this, 'Missing identity parameter on your request') || this;
|
|
24
24
|
}
|
|
25
25
|
MissingIdentityException.throw = function () {
|
|
26
|
-
throw new MissingIdentityException;
|
|
26
|
+
throw new MissingIdentityException();
|
|
27
27
|
};
|
|
28
28
|
return MissingIdentityException;
|
|
29
29
|
}(common_1.PreconditionFailedException));
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { AbstractEntity } from '../../../
|
|
1
|
+
import { AbstractEntity } from '../../../abstracts/abstract.entity';
|
|
2
2
|
export declare class FileEntity extends AbstractEntity {
|
|
3
|
-
static readonly $index = "asset_files";
|
|
4
3
|
name: string;
|
|
5
4
|
url: string;
|
|
6
5
|
weak: boolean;
|
|
@@ -23,5 +23,12 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose" />
|
|
25
25
|
/// <reference types="mongoose/types/inferschematype" />
|
|
26
|
-
import {
|
|
27
|
-
export declare
|
|
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 = {}));
|
|
@@ -23,5 +23,12 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose" />
|
|
25
25
|
/// <reference types="mongoose/types/inferschematype" />
|
|
26
|
-
import {
|
|
27
|
-
export declare
|
|
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 = {}));
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
export declare class CreateUserValidator {
|
|
2
|
+
auth0: string;
|
|
3
|
+
name: string;
|
|
4
|
+
email: string;
|
|
5
|
+
picture: string;
|
|
6
|
+
locale: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class UpdatedUserValidator {
|
|
9
|
+
name?: string;
|
|
10
|
+
picture?: string;
|
|
11
|
+
locale?: string;
|
|
10
12
|
}
|
|
@@ -9,42 +9,50 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.UpdatedUserValidator = exports.CreateUserValidator = void 0;
|
|
13
13
|
var class_validator_1 = require("class-validator");
|
|
14
|
-
var
|
|
15
|
-
function
|
|
14
|
+
var CreateUserValidator = exports.CreateUserValidator = (function () {
|
|
15
|
+
function CreateUserValidator() {
|
|
16
16
|
}
|
|
17
17
|
__decorate([
|
|
18
|
-
(0, class_validator_1.
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
19
|
__metadata("design:type", String)
|
|
20
|
-
],
|
|
20
|
+
], CreateUserValidator.prototype, "auth0", void 0);
|
|
21
21
|
__decorate([
|
|
22
22
|
(0, class_validator_1.IsString)(),
|
|
23
23
|
__metadata("design:type", String)
|
|
24
|
-
],
|
|
24
|
+
], CreateUserValidator.prototype, "name", void 0);
|
|
25
25
|
__decorate([
|
|
26
|
-
(0, class_validator_1.
|
|
26
|
+
(0, class_validator_1.IsEmail)(),
|
|
27
27
|
__metadata("design:type", String)
|
|
28
|
-
],
|
|
28
|
+
], CreateUserValidator.prototype, "email", void 0);
|
|
29
29
|
__decorate([
|
|
30
30
|
(0, class_validator_1.IsString)(),
|
|
31
31
|
__metadata("design:type", String)
|
|
32
|
-
],
|
|
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
|
+
}
|
|
33
42
|
__decorate([
|
|
34
43
|
(0, class_validator_1.IsString)(),
|
|
35
44
|
(0, class_validator_1.IsOptional)(),
|
|
36
45
|
__metadata("design:type", String)
|
|
37
|
-
],
|
|
46
|
+
], UpdatedUserValidator.prototype, "name", void 0);
|
|
38
47
|
__decorate([
|
|
39
|
-
(0, class_validator_1.IsOptional)(),
|
|
40
48
|
(0, class_validator_1.IsString)(),
|
|
49
|
+
(0, class_validator_1.IsOptional)(),
|
|
41
50
|
__metadata("design:type", String)
|
|
42
|
-
],
|
|
51
|
+
], UpdatedUserValidator.prototype, "picture", void 0);
|
|
43
52
|
__decorate([
|
|
44
|
-
(0, class_validator_1.
|
|
53
|
+
(0, class_validator_1.IsLocale)(),
|
|
45
54
|
(0, class_validator_1.IsOptional)(),
|
|
46
55
|
__metadata("design:type", String)
|
|
47
|
-
],
|
|
48
|
-
return
|
|
56
|
+
], UpdatedUserValidator.prototype, "locale", void 0);
|
|
57
|
+
return UpdatedUserValidator;
|
|
49
58
|
}());
|
|
50
|
-
exports.AddressValidator = AddressValidator;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { AbstractEntity } from '../../../
|
|
2
|
-
import { FileEntity } from '../../asset/files/file.entity';
|
|
1
|
+
import { AbstractEntity } from '../../../abstracts/abstract.entity';
|
|
3
2
|
export declare class BrandEntity extends AbstractEntity {
|
|
4
|
-
static readonly $index = "inventory_brands";
|
|
5
3
|
name: string;
|
|
6
4
|
description: string;
|
|
7
|
-
image: FileEntity;
|
|
8
5
|
readonly picture: string;
|
|
9
6
|
}
|
|
@@ -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 = {}));
|
|
@@ -26,8 +26,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
27
|
exports.UpdateBrandValidator = exports.CreateBrandValidator = void 0;
|
|
28
28
|
var class_validator_1 = require("class-validator");
|
|
29
|
-
var abstract_validator_1 = require("../../../
|
|
30
|
-
var CreateBrandValidator = (function (_super) {
|
|
29
|
+
var abstract_validator_1 = require("../../../abstracts/abstract.validator");
|
|
30
|
+
var CreateBrandValidator = exports.CreateBrandValidator = (function (_super) {
|
|
31
31
|
__extends(CreateBrandValidator, _super);
|
|
32
32
|
function CreateBrandValidator() {
|
|
33
33
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -44,12 +44,12 @@ var CreateBrandValidator = (function (_super) {
|
|
|
44
44
|
], CreateBrandValidator.prototype, "description", void 0);
|
|
45
45
|
__decorate([
|
|
46
46
|
(0, class_validator_1.IsMongoId)(),
|
|
47
|
+
(0, class_validator_1.IsOptional)(),
|
|
47
48
|
__metadata("design:type", String)
|
|
48
49
|
], CreateBrandValidator.prototype, "image", void 0);
|
|
49
50
|
return CreateBrandValidator;
|
|
50
51
|
}(abstract_validator_1.AbstractValidator));
|
|
51
|
-
exports.
|
|
52
|
-
var UpdateBrandValidator = (function (_super) {
|
|
52
|
+
var UpdateBrandValidator = exports.UpdateBrandValidator = (function (_super) {
|
|
53
53
|
__extends(UpdateBrandValidator, _super);
|
|
54
54
|
function UpdateBrandValidator() {
|
|
55
55
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -72,4 +72,3 @@ var UpdateBrandValidator = (function (_super) {
|
|
|
72
72
|
], UpdateBrandValidator.prototype, "image", void 0);
|
|
73
73
|
return UpdateBrandValidator;
|
|
74
74
|
}(abstract_validator_1.AbstractValidator));
|
|
75
|
-
exports.UpdateBrandValidator = UpdateBrandValidator;
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import { AbstractEntity } from '../../../
|
|
2
|
-
import { PropertyEntity } from '../properties/property.entity';
|
|
3
|
-
import { FileEntity } from '../../asset/files/file.entity';
|
|
1
|
+
import { AbstractEntity } from '../../../abstracts/abstract.entity';
|
|
4
2
|
export declare class CategoryEntity extends AbstractEntity {
|
|
5
|
-
static readonly $index = "inventory_categories";
|
|
6
3
|
name: string;
|
|
7
4
|
description: string;
|
|
8
|
-
|
|
9
|
-
properties: PropertyEntity[];
|
|
10
|
-
image: FileEntity;
|
|
11
|
-
readonly picture: string;
|
|
5
|
+
picture: string;
|
|
12
6
|
}
|
|
@@ -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 = {}));
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
export declare class CreateCategoryValidator extends AbstractValidator {
|
|
1
|
+
export declare class CreateCategoryValidator {
|
|
3
2
|
name: string;
|
|
4
3
|
description?: string;
|
|
5
|
-
icon: string;
|
|
6
|
-
image: string;
|
|
7
4
|
}
|
|
8
|
-
export declare class UpdateCategoryValidator
|
|
5
|
+
export declare class UpdateCategoryValidator {
|
|
9
6
|
name: string;
|
|
10
7
|
description?: string;
|
|
11
|
-
icon: string;
|
|
12
|
-
image: string;
|
|
13
8
|
}
|
|
@@ -1,19 +1,4 @@
|
|
|
1
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
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -26,17 +11,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
26
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
12
|
exports.UpdateCategoryValidator = exports.CreateCategoryValidator = void 0;
|
|
28
13
|
var class_validator_1 = require("class-validator");
|
|
29
|
-
var
|
|
30
|
-
var CreateCategoryValidator = (function (_super) {
|
|
31
|
-
__extends(CreateCategoryValidator, _super);
|
|
14
|
+
var CreateCategoryValidator = exports.CreateCategoryValidator = (function () {
|
|
32
15
|
function CreateCategoryValidator() {
|
|
33
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
34
|
-
_this.icon = 'tag';
|
|
35
|
-
return _this;
|
|
36
16
|
}
|
|
37
17
|
__decorate([
|
|
38
18
|
(0, class_validator_1.IsString)(),
|
|
39
|
-
(0, class_validator_1.Length)(5, 32),
|
|
40
19
|
__metadata("design:type", String)
|
|
41
20
|
], CreateCategoryValidator.prototype, "name", void 0);
|
|
42
21
|
__decorate([
|
|
@@ -44,24 +23,10 @@ var CreateCategoryValidator = (function (_super) {
|
|
|
44
23
|
(0, class_validator_1.IsOptional)(),
|
|
45
24
|
__metadata("design:type", String)
|
|
46
25
|
], CreateCategoryValidator.prototype, "description", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, class_validator_1.IsString)(),
|
|
49
|
-
(0, class_validator_1.IsOptional)(),
|
|
50
|
-
__metadata("design:type", Object)
|
|
51
|
-
], CreateCategoryValidator.prototype, "icon", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, class_validator_1.IsMongoId)(),
|
|
54
|
-
__metadata("design:type", String)
|
|
55
|
-
], CreateCategoryValidator.prototype, "image", void 0);
|
|
56
26
|
return CreateCategoryValidator;
|
|
57
|
-
}(
|
|
58
|
-
exports.
|
|
59
|
-
var UpdateCategoryValidator = (function (_super) {
|
|
60
|
-
__extends(UpdateCategoryValidator, _super);
|
|
27
|
+
}());
|
|
28
|
+
var UpdateCategoryValidator = exports.UpdateCategoryValidator = (function () {
|
|
61
29
|
function UpdateCategoryValidator() {
|
|
62
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
63
|
-
_this.icon = 'tag';
|
|
64
|
-
return _this;
|
|
65
30
|
}
|
|
66
31
|
__decorate([
|
|
67
32
|
(0, class_validator_1.IsString)(),
|
|
@@ -73,16 +38,5 @@ var UpdateCategoryValidator = (function (_super) {
|
|
|
73
38
|
(0, class_validator_1.IsOptional)(),
|
|
74
39
|
__metadata("design:type", String)
|
|
75
40
|
], UpdateCategoryValidator.prototype, "description", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
(0, class_validator_1.IsString)(),
|
|
78
|
-
(0, class_validator_1.IsOptional)(),
|
|
79
|
-
__metadata("design:type", Object)
|
|
80
|
-
], UpdateCategoryValidator.prototype, "icon", void 0);
|
|
81
|
-
__decorate([
|
|
82
|
-
(0, class_validator_1.IsMongoId)(),
|
|
83
|
-
(0, class_validator_1.IsOptional)(),
|
|
84
|
-
__metadata("design:type", String)
|
|
85
|
-
], UpdateCategoryValidator.prototype, "image", void 0);
|
|
86
41
|
return UpdateCategoryValidator;
|
|
87
|
-
}(
|
|
88
|
-
exports.UpdateCategoryValidator = UpdateCategoryValidator;
|
|
42
|
+
}());
|