@merkaly/api 0.2.1-1 → 0.2.1-2
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/config/app.document.js +8 -4
- package/.output/config/app.entity.d.ts +8 -0
- package/.output/config/app.entity.js +31 -0
- package/.output/src/auth/auth.validator.d.ts +0 -1
- package/.output/src/auth/auth.validator.js +4 -3
- package/.output/src/inventory/brands/brand.document.js +4 -2
- package/.output/src/inventory/brands/brand.entity.d.ts +7 -0
- package/.output/src/inventory/brands/brand.entity.js +24 -0
- package/.output/src/inventory/brands/brand.validator.js +8 -4
- package/.output/src/inventory/categories/category.document.js +4 -2
- package/.output/src/inventory/categories/category.entity.d.ts +7 -0
- package/.output/src/inventory/categories/category.entity.js +24 -0
- package/.output/src/inventory/categories/category.validator.d.ts +0 -1
- package/.output/src/inventory/categories/category.validator.js +8 -5
- package/.output/src/inventory/media/media.document.js +4 -2
- package/.output/src/inventory/media/media.entity.d.ts +7 -0
- package/.output/src/inventory/media/media.entity.js +24 -0
- package/.output/src/inventory/media/media.validator.d.ts +0 -1
- package/.output/src/inventory/media/media.validator.js +4 -3
- package/.output/src/inventory/products/product.document.d.ts +1 -0
- package/.output/src/inventory/products/product.document.js +16 -6
- package/.output/src/inventory/products/product.entity.d.ts +19 -0
- package/.output/src/inventory/products/product.entity.js +67 -0
- package/.output/src/inventory/products/product.validator.d.ts +1 -2
- package/.output/src/inventory/products/product.validator.js +28 -15
- package/.output/src/inventory/variants/variant.document.js +8 -4
- package/.output/src/inventory/variants/variant.entity.d.ts +11 -0
- package/.output/src/inventory/variants/variant.entity.js +44 -0
- package/.output/src/inventory/variants/variant.validator.d.ts +0 -1
- package/.output/src/inventory/variants/variant.validator.js +16 -9
- package/.output/src/store/orders/order.document.js +4 -2
- package/.output/src/store/orders/order.entity.d.ts +5 -0
- package/.output/src/store/orders/order.entity.js +19 -0
- package/.output/src/store/orders/order.validator.d.ts +0 -1
- package/.output/src/store/orders/order.validator.js +0 -1
- package/package.json +5 -1
|
@@ -14,15 +14,19 @@ class AppDocument {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
__decorate([
|
|
17
|
-
(0, es_mapping_ts_1.EsField)({ type: 'text' })
|
|
17
|
+
(0, es_mapping_ts_1.EsField)({ type: 'text' }),
|
|
18
|
+
__metadata("design:type", String)
|
|
18
19
|
], AppDocument.prototype, "$id", void 0);
|
|
19
20
|
__decorate([
|
|
20
|
-
(0, es_mapping_ts_1.EsField)({ type: 'date' })
|
|
21
|
+
(0, es_mapping_ts_1.EsField)({ type: 'date' }),
|
|
22
|
+
__metadata("design:type", Date)
|
|
21
23
|
], AppDocument.prototype, "$createdAt", void 0);
|
|
22
24
|
__decorate([
|
|
23
|
-
(0, es_mapping_ts_1.EsField)({ type: 'date' })
|
|
25
|
+
(0, es_mapping_ts_1.EsField)({ type: 'date' }),
|
|
26
|
+
__metadata("design:type", Date)
|
|
24
27
|
], AppDocument.prototype, "$updatedAt", void 0);
|
|
25
28
|
__decorate([
|
|
26
|
-
(0, es_mapping_ts_1.EsField)({ type: 'date' })
|
|
29
|
+
(0, es_mapping_ts_1.EsField)({ type: 'date' }),
|
|
30
|
+
__metadata("design:type", Date)
|
|
27
31
|
], AppDocument.prototype, "$deletedAt", void 0);
|
|
28
32
|
exports.AppDocument = AppDocument;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AppEntity = void 0;
|
|
4
|
+
const typeorm_1 = require("typeorm");
|
|
5
|
+
let AppEntity = class AppEntity {
|
|
6
|
+
constructor(id) {
|
|
7
|
+
this.createdAt = new Date();
|
|
8
|
+
this.id = id;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
__decorate([
|
|
12
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
13
|
+
__metadata("design:type", String)
|
|
14
|
+
], AppEntity.prototype, "id", void 0);
|
|
15
|
+
__decorate([
|
|
16
|
+
(0, typeorm_1.CreateDateColumn)({ type: 'datetime', nullable: false }),
|
|
17
|
+
__metadata("design:type", Object)
|
|
18
|
+
], AppEntity.prototype, "createdAt", void 0);
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.UpdateDateColumn)({ type: 'datetime', nullable: true }),
|
|
21
|
+
__metadata("design:type", Date)
|
|
22
|
+
], AppEntity.prototype, "updatedAt", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.DeleteDateColumn)({ type: 'datetime', nullable: true }),
|
|
25
|
+
__metadata("design:type", Date)
|
|
26
|
+
], AppEntity.prototype, "deletedAt", void 0);
|
|
27
|
+
AppEntity = __decorate([
|
|
28
|
+
(0, typeorm_1.Entity)(),
|
|
29
|
+
__metadata("design:paramtypes", [String])
|
|
30
|
+
], AppEntity);
|
|
31
|
+
exports.AppEntity = AppEntity;
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LoginValidator = void 0;
|
|
4
4
|
const class_validator_1 = require("class-validator");
|
|
5
|
-
require("reflect-metadata");
|
|
6
5
|
class LoginValidator {
|
|
7
6
|
}
|
|
8
7
|
__decorate([
|
|
9
|
-
(0, class_validator_1.IsEmail)()
|
|
8
|
+
(0, class_validator_1.IsEmail)(),
|
|
9
|
+
__metadata("design:type", String)
|
|
10
10
|
], LoginValidator.prototype, "username", void 0);
|
|
11
11
|
__decorate([
|
|
12
|
-
(0, class_validator_1.IsNotEmpty)()
|
|
12
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
13
|
+
__metadata("design:type", String)
|
|
13
14
|
], LoginValidator.prototype, "password", void 0);
|
|
14
15
|
exports.LoginValidator = LoginValidator;
|
|
@@ -11,10 +11,12 @@ let BrandDocument = class BrandDocument extends app_document_1.AppDocument {
|
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
__decorate([
|
|
14
|
-
(0, es_mapping_ts_1.EsField)({ type: 'keyword' })
|
|
14
|
+
(0, es_mapping_ts_1.EsField)({ type: 'keyword' }),
|
|
15
|
+
__metadata("design:type", String)
|
|
15
16
|
], BrandDocument.prototype, "name", void 0);
|
|
16
17
|
__decorate([
|
|
17
|
-
(0, es_mapping_ts_1.EsField)({ type: 'text' })
|
|
18
|
+
(0, es_mapping_ts_1.EsField)({ type: 'text' }),
|
|
19
|
+
__metadata("design:type", String)
|
|
18
20
|
], BrandDocument.prototype, "description", void 0);
|
|
19
21
|
BrandDocument = __decorate([
|
|
20
22
|
(0, es_mapping_ts_1.EsEntity)({ mixins: [app_document_1.AppDocument] })
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BrandEntity = void 0;
|
|
4
|
+
const typeorm_1 = require("typeorm");
|
|
5
|
+
const app_entity_1 = require("../../../config/app.entity");
|
|
6
|
+
const product_entity_1 = require("../products/product.entity");
|
|
7
|
+
let BrandEntity = class BrandEntity extends app_entity_1.AppEntity {
|
|
8
|
+
};
|
|
9
|
+
__decorate([
|
|
10
|
+
(0, typeorm_1.Column)({ length: 32, unique: true }),
|
|
11
|
+
__metadata("design:type", String)
|
|
12
|
+
], BrandEntity.prototype, "name", void 0);
|
|
13
|
+
__decorate([
|
|
14
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
15
|
+
__metadata("design:type", String)
|
|
16
|
+
], BrandEntity.prototype, "description", void 0);
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, typeorm_1.OneToMany)(() => product_entity_1.ProductEntity, ({ brand }) => brand),
|
|
19
|
+
__metadata("design:type", Array)
|
|
20
|
+
], BrandEntity.prototype, "products", void 0);
|
|
21
|
+
BrandEntity = __decorate([
|
|
22
|
+
(0, typeorm_1.Entity)('inventory_brands')
|
|
23
|
+
], BrandEntity);
|
|
24
|
+
exports.BrandEntity = BrandEntity;
|
|
@@ -14,11 +14,13 @@ class CreateBrandValidator extends app_validator_1.AppValidator {
|
|
|
14
14
|
}
|
|
15
15
|
__decorate([
|
|
16
16
|
(0, class_validator_1.IsString)(),
|
|
17
|
-
(0, class_validator_1.Length)(2, 32)
|
|
17
|
+
(0, class_validator_1.Length)(2, 32),
|
|
18
|
+
__metadata("design:type", String)
|
|
18
19
|
], CreateBrandValidator.prototype, "name", void 0);
|
|
19
20
|
__decorate([
|
|
20
21
|
(0, class_validator_1.IsString)(),
|
|
21
|
-
(0, class_validator_1.IsOptional)()
|
|
22
|
+
(0, class_validator_1.IsOptional)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
22
24
|
], CreateBrandValidator.prototype, "description", void 0);
|
|
23
25
|
exports.CreateBrandValidator = CreateBrandValidator;
|
|
24
26
|
class UpdateBrandValidator extends app_validator_1.AppValidator {
|
|
@@ -34,10 +36,12 @@ class UpdateBrandValidator extends app_validator_1.AppValidator {
|
|
|
34
36
|
}
|
|
35
37
|
__decorate([
|
|
36
38
|
(0, class_validator_1.IsString)(),
|
|
37
|
-
(0, class_validator_1.IsOptional)()
|
|
39
|
+
(0, class_validator_1.IsOptional)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
38
41
|
], UpdateBrandValidator.prototype, "name", void 0);
|
|
39
42
|
__decorate([
|
|
40
43
|
(0, class_validator_1.IsString)(),
|
|
41
|
-
(0, class_validator_1.IsOptional)()
|
|
44
|
+
(0, class_validator_1.IsOptional)(),
|
|
45
|
+
__metadata("design:type", String)
|
|
42
46
|
], UpdateBrandValidator.prototype, "description", void 0);
|
|
43
47
|
exports.UpdateBrandValidator = UpdateBrandValidator;
|
|
@@ -11,10 +11,12 @@ let CategoryDocument = class CategoryDocument extends app_document_1.AppDocument
|
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
__decorate([
|
|
14
|
-
(0, es_mapping_ts_1.EsField)({ type: 'keyword' })
|
|
14
|
+
(0, es_mapping_ts_1.EsField)({ type: 'keyword' }),
|
|
15
|
+
__metadata("design:type", String)
|
|
15
16
|
], CategoryDocument.prototype, "name", void 0);
|
|
16
17
|
__decorate([
|
|
17
|
-
(0, es_mapping_ts_1.EsField)({ type: 'text' })
|
|
18
|
+
(0, es_mapping_ts_1.EsField)({ type: 'text' }),
|
|
19
|
+
__metadata("design:type", String)
|
|
18
20
|
], CategoryDocument.prototype, "description", void 0);
|
|
19
21
|
CategoryDocument = __decorate([
|
|
20
22
|
(0, es_mapping_ts_1.EsEntity)({ mixins: [app_document_1.AppDocument] })
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CategoryEntity = void 0;
|
|
4
|
+
const typeorm_1 = require("typeorm");
|
|
5
|
+
const app_entity_1 = require("../../../config/app.entity");
|
|
6
|
+
const product_entity_1 = require("../products/product.entity");
|
|
7
|
+
let CategoryEntity = class CategoryEntity extends app_entity_1.AppEntity {
|
|
8
|
+
};
|
|
9
|
+
__decorate([
|
|
10
|
+
(0, typeorm_1.Column)({ length: 32, unique: true }),
|
|
11
|
+
__metadata("design:type", String)
|
|
12
|
+
], CategoryEntity.prototype, "name", void 0);
|
|
13
|
+
__decorate([
|
|
14
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
15
|
+
__metadata("design:type", String)
|
|
16
|
+
], CategoryEntity.prototype, "description", void 0);
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, typeorm_1.OneToMany)(() => product_entity_1.ProductEntity, ({ category }) => category),
|
|
19
|
+
__metadata("design:type", Array)
|
|
20
|
+
], CategoryEntity.prototype, "products", void 0);
|
|
21
|
+
CategoryEntity = __decorate([
|
|
22
|
+
(0, typeorm_1.Entity)('inventory_categories')
|
|
23
|
+
], CategoryEntity);
|
|
24
|
+
exports.CategoryEntity = CategoryEntity;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpdateCategoryValidator = exports.CreateCategoryValidator = exports.FindCategoryValidator = void 0;
|
|
4
4
|
const class_validator_1 = require("class-validator");
|
|
5
|
-
require("reflect-metadata");
|
|
6
5
|
const app_validator_1 = require("../../../config/app.validator");
|
|
7
6
|
const category_entity_1 = require("./category.entity");
|
|
8
7
|
class FindCategoryValidator {
|
|
@@ -18,11 +17,13 @@ class CreateCategoryValidator extends app_validator_1.AppValidator {
|
|
|
18
17
|
}
|
|
19
18
|
__decorate([
|
|
20
19
|
(0, class_validator_1.IsString)(),
|
|
21
|
-
(0, class_validator_1.Length)(5, 32)
|
|
20
|
+
(0, class_validator_1.Length)(5, 32),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
22
|
], CreateCategoryValidator.prototype, "name", void 0);
|
|
23
23
|
__decorate([
|
|
24
24
|
(0, class_validator_1.IsString)(),
|
|
25
|
-
(0, class_validator_1.IsOptional)()
|
|
25
|
+
(0, class_validator_1.IsOptional)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
26
27
|
], CreateCategoryValidator.prototype, "description", void 0);
|
|
27
28
|
exports.CreateCategoryValidator = CreateCategoryValidator;
|
|
28
29
|
class UpdateCategoryValidator extends app_validator_1.AppValidator {
|
|
@@ -38,10 +39,12 @@ class UpdateCategoryValidator extends app_validator_1.AppValidator {
|
|
|
38
39
|
}
|
|
39
40
|
__decorate([
|
|
40
41
|
(0, class_validator_1.IsString)(),
|
|
41
|
-
(0, class_validator_1.IsOptional)()
|
|
42
|
+
(0, class_validator_1.IsOptional)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
42
44
|
], UpdateCategoryValidator.prototype, "name", void 0);
|
|
43
45
|
__decorate([
|
|
44
46
|
(0, class_validator_1.IsString)(),
|
|
45
|
-
(0, class_validator_1.IsOptional)()
|
|
47
|
+
(0, class_validator_1.IsOptional)(),
|
|
48
|
+
__metadata("design:type", String)
|
|
46
49
|
], UpdateCategoryValidator.prototype, "description", void 0);
|
|
47
50
|
exports.UpdateCategoryValidator = UpdateCategoryValidator;
|
|
@@ -11,10 +11,12 @@ let MediaDocument = class MediaDocument extends app_document_1.AppDocument {
|
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
__decorate([
|
|
14
|
-
(0, es_mapping_ts_1.EsField)({ type: 'text' })
|
|
14
|
+
(0, es_mapping_ts_1.EsField)({ type: 'text' }),
|
|
15
|
+
__metadata("design:type", String)
|
|
15
16
|
], MediaDocument.prototype, "name", void 0);
|
|
16
17
|
__decorate([
|
|
17
|
-
(0, es_mapping_ts_1.EsField)({ type: 'text' })
|
|
18
|
+
(0, es_mapping_ts_1.EsField)({ type: 'text' }),
|
|
19
|
+
__metadata("design:type", String)
|
|
18
20
|
], MediaDocument.prototype, "url", void 0);
|
|
19
21
|
MediaDocument = __decorate([
|
|
20
22
|
(0, es_mapping_ts_1.EsEntity)({ mixins: [app_document_1.AppDocument] })
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MediaEntity = void 0;
|
|
4
|
+
const typeorm_1 = require("typeorm");
|
|
5
|
+
const app_entity_1 = require("../../../config/app.entity");
|
|
6
|
+
const product_entity_1 = require("../products/product.entity");
|
|
7
|
+
let MediaEntity = class MediaEntity extends app_entity_1.AppEntity {
|
|
8
|
+
};
|
|
9
|
+
__decorate([
|
|
10
|
+
(0, typeorm_1.Column)({ length: 64 }),
|
|
11
|
+
__metadata("design:type", String)
|
|
12
|
+
], MediaEntity.prototype, "name", void 0);
|
|
13
|
+
__decorate([
|
|
14
|
+
(0, typeorm_1.Column)({ length: 2048 }),
|
|
15
|
+
__metadata("design:type", String)
|
|
16
|
+
], MediaEntity.prototype, "url", void 0);
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, typeorm_1.ManyToOne)(() => product_entity_1.ProductEntity, ({ media }) => media),
|
|
19
|
+
__metadata("design:type", product_entity_1.ProductEntity)
|
|
20
|
+
], MediaEntity.prototype, "product", void 0);
|
|
21
|
+
MediaEntity = __decorate([
|
|
22
|
+
(0, typeorm_1.Entity)('inventory_media')
|
|
23
|
+
], MediaEntity);
|
|
24
|
+
exports.MediaEntity = MediaEntity;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpdateMediaValidator = exports.CreateMediaValidator = void 0;
|
|
4
4
|
const class_validator_1 = require("class-validator");
|
|
5
|
-
require("reflect-metadata");
|
|
6
5
|
const app_validator_1 = require("../../../config/app.validator");
|
|
7
6
|
const media_entity_1 = require("./media.entity");
|
|
8
7
|
class CreateMediaValidator extends app_validator_1.AppValidator {
|
|
@@ -13,7 +12,8 @@ class CreateMediaValidator extends app_validator_1.AppValidator {
|
|
|
13
12
|
}
|
|
14
13
|
}
|
|
15
14
|
__decorate([
|
|
16
|
-
(0, class_validator_1.IsString)()
|
|
15
|
+
(0, class_validator_1.IsString)(),
|
|
16
|
+
__metadata("design:type", String)
|
|
17
17
|
], CreateMediaValidator.prototype, "name", void 0);
|
|
18
18
|
exports.CreateMediaValidator = CreateMediaValidator;
|
|
19
19
|
class UpdateMediaValidator extends app_validator_1.AppValidator {
|
|
@@ -26,6 +26,7 @@ class UpdateMediaValidator extends app_validator_1.AppValidator {
|
|
|
26
26
|
}
|
|
27
27
|
__decorate([
|
|
28
28
|
(0, class_validator_1.IsString)(),
|
|
29
|
-
(0, class_validator_1.IsOptional)()
|
|
29
|
+
(0, class_validator_1.IsOptional)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
30
31
|
], UpdateMediaValidator.prototype, "name", void 0);
|
|
31
32
|
exports.UpdateMediaValidator = UpdateMediaValidator;
|
|
@@ -15,22 +15,32 @@ let ProductDocument = class ProductDocument extends app_document_1.AppDocument {
|
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
__decorate([
|
|
18
|
-
(0, es_mapping_ts_1.EsField)({ type: 'keyword' })
|
|
18
|
+
(0, es_mapping_ts_1.EsField)({ type: 'keyword' }),
|
|
19
|
+
__metadata("design:type", String)
|
|
19
20
|
], ProductDocument.prototype, "name", void 0);
|
|
20
21
|
__decorate([
|
|
21
|
-
(0, es_mapping_ts_1.EsField)({ type: 'keyword' })
|
|
22
|
+
(0, es_mapping_ts_1.EsField)({ type: 'keyword' }),
|
|
23
|
+
__metadata("design:type", String)
|
|
22
24
|
], ProductDocument.prototype, "description", void 0);
|
|
23
25
|
__decorate([
|
|
24
|
-
(0, es_mapping_ts_1.EsField)({ type: 'date' })
|
|
26
|
+
(0, es_mapping_ts_1.EsField)({ type: 'date' }),
|
|
27
|
+
__metadata("design:type", Date)
|
|
25
28
|
], ProductDocument.prototype, "availableFrom", void 0);
|
|
26
29
|
__decorate([
|
|
27
|
-
(0, es_mapping_ts_1.EsField)({ type: '
|
|
30
|
+
(0, es_mapping_ts_1.EsField)({ type: 'nested' }),
|
|
31
|
+
__metadata("design:type", Array)
|
|
32
|
+
], ProductDocument.prototype, "hashtags", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, es_mapping_ts_1.EsField)({ type: 'boolean' }),
|
|
35
|
+
__metadata("design:type", Boolean)
|
|
28
36
|
], ProductDocument.prototype, "active", void 0);
|
|
29
37
|
__decorate([
|
|
30
|
-
(0, es_mapping_ts_1.EsField)({ type: 'text' })
|
|
38
|
+
(0, es_mapping_ts_1.EsField)({ type: 'text' }),
|
|
39
|
+
__metadata("design:type", String)
|
|
31
40
|
], ProductDocument.prototype, "category", void 0);
|
|
32
41
|
__decorate([
|
|
33
|
-
(0, es_mapping_ts_1.EsField)({ type: 'text' })
|
|
42
|
+
(0, es_mapping_ts_1.EsField)({ type: 'text' }),
|
|
43
|
+
__metadata("design:type", String)
|
|
34
44
|
], ProductDocument.prototype, "brand", void 0);
|
|
35
45
|
ProductDocument = __decorate([
|
|
36
46
|
(0, es_mapping_ts_1.EsEntity)({ mixins: [app_document_1.AppDocument] })
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AppEntity } from '../../../config/app.entity';
|
|
2
|
+
import { BrandEntity } from '../brands/brand.entity';
|
|
3
|
+
import { CategoryEntity } from '../categories/category.entity';
|
|
4
|
+
import { MediaEntity } from '../media/media.entity';
|
|
5
|
+
import { VariantEntity } from '../variants/variant.entity';
|
|
6
|
+
export declare class ProductEntity extends AppEntity {
|
|
7
|
+
name: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
active: boolean;
|
|
10
|
+
availableFrom: Date;
|
|
11
|
+
hashtags: string[];
|
|
12
|
+
category?: CategoryEntity;
|
|
13
|
+
brand?: BrandEntity;
|
|
14
|
+
variant: VariantEntity;
|
|
15
|
+
variants: VariantEntity[];
|
|
16
|
+
media: MediaEntity[];
|
|
17
|
+
get isOutOfStock(): boolean;
|
|
18
|
+
get isDraft(): boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProductEntity = void 0;
|
|
4
|
+
const typeorm_1 = require("typeorm");
|
|
5
|
+
const app_entity_1 = require("../../../config/app.entity");
|
|
6
|
+
const brand_entity_1 = require("../brands/brand.entity");
|
|
7
|
+
const category_entity_1 = require("../categories/category.entity");
|
|
8
|
+
const media_entity_1 = require("../media/media.entity");
|
|
9
|
+
const variant_entity_1 = require("../variants/variant.entity");
|
|
10
|
+
let ProductEntity = class ProductEntity extends app_entity_1.AppEntity {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.active = true;
|
|
14
|
+
this.availableFrom = new Date();
|
|
15
|
+
this.hashtags = [];
|
|
16
|
+
}
|
|
17
|
+
get isOutOfStock() {
|
|
18
|
+
return this.variants.every(variant => variant.isOutOfStock);
|
|
19
|
+
}
|
|
20
|
+
get isDraft() {
|
|
21
|
+
return this.active === true;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ length: 64 }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], ProductEntity.prototype, "name", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], ProductEntity.prototype, "description", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], ProductEntity.prototype, "active", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], ProductEntity.prototype, "availableFrom", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'simple-array', nullable: true }),
|
|
42
|
+
__metadata("design:type", Array)
|
|
43
|
+
], ProductEntity.prototype, "hashtags", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.ManyToOne)(() => category_entity_1.CategoryEntity, ({ products }) => products),
|
|
46
|
+
__metadata("design:type", category_entity_1.CategoryEntity)
|
|
47
|
+
], ProductEntity.prototype, "category", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.ManyToOne)(() => brand_entity_1.BrandEntity, ({ products }) => products),
|
|
50
|
+
__metadata("design:type", brand_entity_1.BrandEntity)
|
|
51
|
+
], ProductEntity.prototype, "brand", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.ManyToOne)(() => variant_entity_1.VariantEntity, ({ product }) => product),
|
|
54
|
+
__metadata("design:type", variant_entity_1.VariantEntity)
|
|
55
|
+
], ProductEntity.prototype, "variant", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.OneToMany)(() => variant_entity_1.VariantEntity, ({ product }) => product),
|
|
58
|
+
__metadata("design:type", Array)
|
|
59
|
+
], ProductEntity.prototype, "variants", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.OneToMany)(() => media_entity_1.MediaEntity, ({ product }) => product),
|
|
62
|
+
__metadata("design:type", Array)
|
|
63
|
+
], ProductEntity.prototype, "media", void 0);
|
|
64
|
+
ProductEntity = __decorate([
|
|
65
|
+
(0, typeorm_1.Entity)('inventory_products')
|
|
66
|
+
], ProductEntity);
|
|
67
|
+
exports.ProductEntity = ProductEntity;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Id } from '@elastic/elasticsearch/lib/api/types';
|
|
2
|
-
import 'reflect-metadata';
|
|
3
2
|
import { AppValidator } from '../../../config/app.validator';
|
|
4
3
|
import { CreateVariantValidator } from '../variants/variant.validator';
|
|
5
4
|
import { ProductEntity } from './product.entity';
|
|
@@ -11,7 +10,7 @@ export declare class CreateProductValidator extends AppValidator<ProductEntity>
|
|
|
11
10
|
category?: Id;
|
|
12
11
|
brand?: Id;
|
|
13
12
|
hashtags: string[];
|
|
14
|
-
variants
|
|
13
|
+
variants?: CreateVariantValidator[];
|
|
15
14
|
toEntity(): ProductEntity;
|
|
16
15
|
}
|
|
17
16
|
export declare class UpdateProductValidator extends AppValidator<ProductEntity> {
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.UpdateProductValidator = exports.CreateProductValidator = void 0;
|
|
4
4
|
const class_transformer_1 = require("class-transformer");
|
|
5
5
|
const class_validator_1 = require("class-validator");
|
|
6
|
-
require("reflect-metadata");
|
|
7
6
|
const app_validator_1 = require("../../../config/app.validator");
|
|
8
7
|
const brand_entity_1 = require("../brands/brand.entity");
|
|
9
8
|
const category_entity_1 = require("../categories/category.entity");
|
|
@@ -29,36 +28,44 @@ class CreateProductValidator extends app_validator_1.AppValidator {
|
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
30
|
__decorate([
|
|
32
|
-
(0, class_validator_1.IsString)()
|
|
31
|
+
(0, class_validator_1.IsString)(),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
33
|
], CreateProductValidator.prototype, "name", void 0);
|
|
34
34
|
__decorate([
|
|
35
35
|
(0, class_validator_1.IsString)(),
|
|
36
|
-
(0, class_validator_1.IsOptional)()
|
|
36
|
+
(0, class_validator_1.IsOptional)(),
|
|
37
|
+
__metadata("design:type", String)
|
|
37
38
|
], CreateProductValidator.prototype, "description", void 0);
|
|
38
39
|
__decorate([
|
|
39
40
|
(0, class_validator_1.IsDateString)(),
|
|
40
|
-
(0, class_validator_1.IsOptional)()
|
|
41
|
+
(0, class_validator_1.IsOptional)(),
|
|
42
|
+
__metadata("design:type", Date)
|
|
41
43
|
], CreateProductValidator.prototype, "availableFrom", void 0);
|
|
42
44
|
__decorate([
|
|
43
45
|
(0, class_validator_1.IsBoolean)(),
|
|
44
|
-
(0, class_validator_1.IsOptional)()
|
|
46
|
+
(0, class_validator_1.IsOptional)(),
|
|
47
|
+
__metadata("design:type", Object)
|
|
45
48
|
], CreateProductValidator.prototype, "active", void 0);
|
|
46
49
|
__decorate([
|
|
47
50
|
(0, class_validator_1.IsOptional)(),
|
|
48
|
-
(0, class_validator_1.IsUUID)()
|
|
51
|
+
(0, class_validator_1.IsUUID)(),
|
|
52
|
+
__metadata("design:type", String)
|
|
49
53
|
], CreateProductValidator.prototype, "category", void 0);
|
|
50
54
|
__decorate([
|
|
51
55
|
(0, class_validator_1.IsOptional)(),
|
|
52
|
-
(0, class_validator_1.IsUUID)()
|
|
56
|
+
(0, class_validator_1.IsUUID)(),
|
|
57
|
+
__metadata("design:type", String)
|
|
53
58
|
], CreateProductValidator.prototype, "brand", void 0);
|
|
54
59
|
__decorate([
|
|
55
60
|
(0, class_validator_1.IsOptional)(),
|
|
56
|
-
(0, class_validator_1.IsString)({ each: true })
|
|
61
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
62
|
+
__metadata("design:type", Array)
|
|
57
63
|
], CreateProductValidator.prototype, "hashtags", void 0);
|
|
58
64
|
__decorate([
|
|
59
65
|
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
60
66
|
(0, class_transformer_1.Type)(() => variant_validator_1.CreateVariantValidator),
|
|
61
|
-
(0, class_validator_1.IsOptional)()
|
|
67
|
+
(0, class_validator_1.IsOptional)(),
|
|
68
|
+
__metadata("design:type", Array)
|
|
62
69
|
], CreateProductValidator.prototype, "variants", void 0);
|
|
63
70
|
exports.CreateProductValidator = CreateProductValidator;
|
|
64
71
|
class UpdateProductValidator extends app_validator_1.AppValidator {
|
|
@@ -86,26 +93,32 @@ class UpdateProductValidator extends app_validator_1.AppValidator {
|
|
|
86
93
|
}
|
|
87
94
|
__decorate([
|
|
88
95
|
(0, class_validator_1.IsString)(),
|
|
89
|
-
(0, class_validator_1.IsOptional)()
|
|
96
|
+
(0, class_validator_1.IsOptional)(),
|
|
97
|
+
__metadata("design:type", String)
|
|
90
98
|
], UpdateProductValidator.prototype, "name", void 0);
|
|
91
99
|
__decorate([
|
|
92
100
|
(0, class_validator_1.IsString)(),
|
|
93
|
-
(0, class_validator_1.IsOptional)()
|
|
101
|
+
(0, class_validator_1.IsOptional)(),
|
|
102
|
+
__metadata("design:type", String)
|
|
94
103
|
], UpdateProductValidator.prototype, "description", void 0);
|
|
95
104
|
__decorate([
|
|
96
105
|
(0, class_validator_1.IsOptional)(),
|
|
97
|
-
(0, class_validator_1.IsPositive)()
|
|
106
|
+
(0, class_validator_1.IsPositive)(),
|
|
107
|
+
__metadata("design:type", String)
|
|
98
108
|
], UpdateProductValidator.prototype, "category", void 0);
|
|
99
109
|
__decorate([
|
|
100
110
|
(0, class_validator_1.IsOptional)(),
|
|
101
|
-
(0, class_validator_1.IsPositive)()
|
|
111
|
+
(0, class_validator_1.IsPositive)(),
|
|
112
|
+
__metadata("design:type", String)
|
|
102
113
|
], UpdateProductValidator.prototype, "brand", void 0);
|
|
103
114
|
__decorate([
|
|
104
115
|
(0, class_validator_1.IsOptional)(),
|
|
105
|
-
(0, class_validator_1.IsString)({ each: true })
|
|
116
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
117
|
+
__metadata("design:type", Array)
|
|
106
118
|
], UpdateProductValidator.prototype, "hashtags", void 0);
|
|
107
119
|
__decorate([
|
|
108
120
|
(0, class_validator_1.IsBoolean)(),
|
|
109
|
-
(0, class_validator_1.IsOptional)()
|
|
121
|
+
(0, class_validator_1.IsOptional)(),
|
|
122
|
+
__metadata("design:type", Boolean)
|
|
110
123
|
], UpdateProductValidator.prototype, "active", void 0);
|
|
111
124
|
exports.UpdateProductValidator = UpdateProductValidator;
|
|
@@ -13,16 +13,20 @@ let VariantDocument = class VariantDocument extends app_document_1.AppDocument {
|
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
__decorate([
|
|
16
|
-
(0, es_mapping_ts_1.EsField)({ type: 'keyword' })
|
|
16
|
+
(0, es_mapping_ts_1.EsField)({ type: 'keyword' }),
|
|
17
|
+
__metadata("design:type", String)
|
|
17
18
|
], VariantDocument.prototype, "sku", void 0);
|
|
18
19
|
__decorate([
|
|
19
|
-
(0, es_mapping_ts_1.EsField)({ type: 'float' })
|
|
20
|
+
(0, es_mapping_ts_1.EsField)({ type: 'float' }),
|
|
21
|
+
__metadata("design:type", Number)
|
|
20
22
|
], VariantDocument.prototype, "quantity", void 0);
|
|
21
23
|
__decorate([
|
|
22
|
-
(0, es_mapping_ts_1.EsField)({ type: 'integer' })
|
|
24
|
+
(0, es_mapping_ts_1.EsField)({ type: 'integer' }),
|
|
25
|
+
__metadata("design:type", Number)
|
|
23
26
|
], VariantDocument.prototype, "price", void 0);
|
|
24
27
|
__decorate([
|
|
25
|
-
(0, es_mapping_ts_1.EsField)({ type: 'boolean' })
|
|
28
|
+
(0, es_mapping_ts_1.EsField)({ type: 'boolean' }),
|
|
29
|
+
__metadata("design:type", Boolean)
|
|
26
30
|
], VariantDocument.prototype, "active", void 0);
|
|
27
31
|
VariantDocument = __decorate([
|
|
28
32
|
(0, es_mapping_ts_1.EsEntity)({ mixins: [app_document_1.AppDocument] })
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AppEntity } from '../../../config/app.entity';
|
|
2
|
+
import { ProductEntity } from '../products/product.entity';
|
|
3
|
+
export declare class VariantEntity extends AppEntity {
|
|
4
|
+
sku: string;
|
|
5
|
+
price: number;
|
|
6
|
+
quantity: number;
|
|
7
|
+
active: boolean;
|
|
8
|
+
product: ProductEntity;
|
|
9
|
+
get isOutOfStock(): boolean;
|
|
10
|
+
get isDraft(): boolean;
|
|
11
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VariantEntity = void 0;
|
|
4
|
+
const typeorm_1 = require("typeorm");
|
|
5
|
+
const app_entity_1 = require("../../../config/app.entity");
|
|
6
|
+
const product_entity_1 = require("../products/product.entity");
|
|
7
|
+
let VariantEntity = class VariantEntity extends app_entity_1.AppEntity {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.price = 0;
|
|
11
|
+
this.quantity = 1;
|
|
12
|
+
this.active = true;
|
|
13
|
+
}
|
|
14
|
+
get isOutOfStock() {
|
|
15
|
+
return this.quantity === 0;
|
|
16
|
+
}
|
|
17
|
+
get isDraft() {
|
|
18
|
+
return this.active === true;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.Column)({ length: 32, unique: true }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], VariantEntity.prototype, "sku", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ type: 'int', default: 0 }),
|
|
27
|
+
__metadata("design:type", Object)
|
|
28
|
+
], VariantEntity.prototype, "price", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'float', default: 1 }),
|
|
31
|
+
__metadata("design:type", Object)
|
|
32
|
+
], VariantEntity.prototype, "quantity", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
35
|
+
__metadata("design:type", Object)
|
|
36
|
+
], VariantEntity.prototype, "active", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.ManyToOne)(() => product_entity_1.ProductEntity, ({ variants }) => variants),
|
|
39
|
+
__metadata("design:type", product_entity_1.ProductEntity)
|
|
40
|
+
], VariantEntity.prototype, "product", void 0);
|
|
41
|
+
VariantEntity = __decorate([
|
|
42
|
+
(0, typeorm_1.Entity)('inventory_variants')
|
|
43
|
+
], VariantEntity);
|
|
44
|
+
exports.VariantEntity = VariantEntity;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpdateVariantValidator = exports.CreateVariantValidator = void 0;
|
|
4
4
|
const class_validator_1 = require("class-validator");
|
|
5
|
-
require("reflect-metadata");
|
|
6
5
|
const app_validator_1 = require("../../../config/app.validator");
|
|
7
6
|
const variant_entity_1 = require("./variant.entity");
|
|
8
7
|
class CreateVariantValidator extends app_validator_1.AppValidator {
|
|
@@ -26,18 +25,22 @@ class CreateVariantValidator extends app_validator_1.AppValidator {
|
|
|
26
25
|
}
|
|
27
26
|
__decorate([
|
|
28
27
|
(0, class_validator_1.IsNumber)(),
|
|
29
|
-
(0, class_validator_1.Min)(0)
|
|
28
|
+
(0, class_validator_1.Min)(0),
|
|
29
|
+
__metadata("design:type", Object)
|
|
30
30
|
], CreateVariantValidator.prototype, "price", void 0);
|
|
31
31
|
__decorate([
|
|
32
|
-
(0, class_validator_1.Length)(1, 32)
|
|
32
|
+
(0, class_validator_1.Length)(1, 32),
|
|
33
|
+
__metadata("design:type", String)
|
|
33
34
|
], CreateVariantValidator.prototype, "sku", void 0);
|
|
34
35
|
__decorate([
|
|
35
36
|
(0, class_validator_1.IsPositive)(),
|
|
36
|
-
(0, class_validator_1.IsOptional)()
|
|
37
|
+
(0, class_validator_1.IsOptional)(),
|
|
38
|
+
__metadata("design:type", Object)
|
|
37
39
|
], CreateVariantValidator.prototype, "quantity", void 0);
|
|
38
40
|
__decorate([
|
|
39
41
|
(0, class_validator_1.IsBoolean)(),
|
|
40
|
-
(0, class_validator_1.IsOptional)()
|
|
42
|
+
(0, class_validator_1.IsOptional)(),
|
|
43
|
+
__metadata("design:type", Object)
|
|
41
44
|
], CreateVariantValidator.prototype, "active", void 0);
|
|
42
45
|
exports.CreateVariantValidator = CreateVariantValidator;
|
|
43
46
|
class UpdateVariantValidator extends app_validator_1.AppValidator {
|
|
@@ -65,17 +68,21 @@ class UpdateVariantValidator extends app_validator_1.AppValidator {
|
|
|
65
68
|
__decorate([
|
|
66
69
|
(0, class_validator_1.IsNumber)(),
|
|
67
70
|
(0, class_validator_1.Min)(0),
|
|
68
|
-
(0, class_validator_1.IsOptional)()
|
|
71
|
+
(0, class_validator_1.IsOptional)(),
|
|
72
|
+
__metadata("design:type", Object)
|
|
69
73
|
], UpdateVariantValidator.prototype, "price", void 0);
|
|
70
74
|
__decorate([
|
|
71
|
-
(0, class_validator_1.IsOptional)()
|
|
75
|
+
(0, class_validator_1.IsOptional)(),
|
|
76
|
+
__metadata("design:type", String)
|
|
72
77
|
], UpdateVariantValidator.prototype, "sku", void 0);
|
|
73
78
|
__decorate([
|
|
74
79
|
(0, class_validator_1.IsPositive)(),
|
|
75
|
-
(0, class_validator_1.IsOptional)()
|
|
80
|
+
(0, class_validator_1.IsOptional)(),
|
|
81
|
+
__metadata("design:type", Object)
|
|
76
82
|
], UpdateVariantValidator.prototype, "quantity", void 0);
|
|
77
83
|
__decorate([
|
|
78
84
|
(0, class_validator_1.IsBoolean)(),
|
|
79
|
-
(0, class_validator_1.IsOptional)()
|
|
85
|
+
(0, class_validator_1.IsOptional)(),
|
|
86
|
+
__metadata("design:type", Object)
|
|
80
87
|
], UpdateVariantValidator.prototype, "active", void 0);
|
|
81
88
|
exports.UpdateVariantValidator = UpdateVariantValidator;
|
|
@@ -11,10 +11,12 @@ let OrderDocument = class OrderDocument extends app_document_1.AppDocument {
|
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
__decorate([
|
|
14
|
-
(0, es_mapping_ts_1.EsField)({ type: 'text' })
|
|
14
|
+
(0, es_mapping_ts_1.EsField)({ type: 'text' }),
|
|
15
|
+
__metadata("design:type", String)
|
|
15
16
|
], OrderDocument.prototype, "number", void 0);
|
|
16
17
|
__decorate([
|
|
17
|
-
(0, es_mapping_ts_1.EsField)({ type: 'integer' })
|
|
18
|
+
(0, es_mapping_ts_1.EsField)({ type: 'integer' }),
|
|
19
|
+
__metadata("design:type", Number)
|
|
18
20
|
], OrderDocument.prototype, "price", void 0);
|
|
19
21
|
OrderDocument = __decorate([
|
|
20
22
|
(0, es_mapping_ts_1.EsEntity)({ mixins: [app_document_1.AppDocument] })
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrderEntity = void 0;
|
|
4
|
+
const typeorm_1 = require("typeorm");
|
|
5
|
+
const app_entity_1 = require("../../../config/app.entity");
|
|
6
|
+
let OrderEntity = class OrderEntity extends app_entity_1.AppEntity {
|
|
7
|
+
};
|
|
8
|
+
__decorate([
|
|
9
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 16 }),
|
|
10
|
+
__metadata("design:type", String)
|
|
11
|
+
], OrderEntity.prototype, "number", void 0);
|
|
12
|
+
__decorate([
|
|
13
|
+
(0, typeorm_1.Column)({ type: 'int' }),
|
|
14
|
+
__metadata("design:type", Number)
|
|
15
|
+
], OrderEntity.prototype, "price", void 0);
|
|
16
|
+
OrderEntity = __decorate([
|
|
17
|
+
(0, typeorm_1.Entity)('store_orders')
|
|
18
|
+
], OrderEntity);
|
|
19
|
+
exports.OrderEntity = OrderEntity;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpdateOrderValidator = exports.CreateOrderValidator = void 0;
|
|
4
|
-
require("reflect-metadata");
|
|
5
4
|
const app_validator_1 = require("../../../config/app.validator");
|
|
6
5
|
const order_entity_1 = require("./order.entity");
|
|
7
6
|
class CreateOrderValidator extends app_validator_1.AppValidator {
|
package/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@merkaly/api",
|
|
3
|
-
"version": "0.2.1-
|
|
3
|
+
"version": "0.2.1-2",
|
|
4
4
|
"description": "NestJS Backend ApiRest Service",
|
|
5
5
|
"author": "Randy Tellez Galan <kronhyx@gmail.com>",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"main": "./.output/app.js",
|
|
8
8
|
"types": "./.output/app.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
".output",
|
|
11
|
+
"index.ts"
|
|
12
|
+
],
|
|
9
13
|
"scripts": {
|
|
10
14
|
"prebuild": "yarn run clean",
|
|
11
15
|
"prepack": ".bin/package.sh",
|