@merkaly/api 0.2.2-16 → 0.2.2-18
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/abstract/abstract.document.d.ts +4 -0
- package/.output/abstract/abstract.document.js +10 -0
- package/.output/main.d.ts +7 -0
- package/.output/modules/inventory/brands/brand.document.d.ts +5 -0
- package/.output/modules/inventory/brands/brand.document.js +9 -0
- package/.output/modules/inventory/categories/category.document.d.ts +5 -0
- package/.output/modules/inventory/categories/category.document.js +9 -0
- package/.output/modules/inventory/products/product.document.d.ts +23 -0
- package/.output/modules/inventory/products/product.document.js +13 -0
- package/.output/modules/settings/organization/organization.validator.d.ts +1 -0
- package/.output/modules/settings/organization/organization.validator.js +6 -0
- package/.output/modules/store/orders/order.entity.d.ts +1 -0
- package/.output/modules/store/orders/order.entity.js +5 -0
- package/.output/modules/store/orders/order.validator.js +0 -1
- package/.output/types.js +2 -0
- package/package.json +6 -5
package/.output/main.d.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BrandDocument = void 0;
|
|
4
|
+
const abstract_document_1 = require("../../../abstract/abstract.document");
|
|
5
|
+
class BrandDocument extends abstract_document_1.AbstractDocument {
|
|
6
|
+
name = String();
|
|
7
|
+
description = String();
|
|
8
|
+
}
|
|
9
|
+
exports.BrandDocument = BrandDocument;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CategoryDocument = void 0;
|
|
4
|
+
const abstract_document_1 = require("../../../abstract/abstract.document");
|
|
5
|
+
class CategoryDocument extends abstract_document_1.AbstractDocument {
|
|
6
|
+
name = String();
|
|
7
|
+
description = String();
|
|
8
|
+
}
|
|
9
|
+
exports.CategoryDocument = CategoryDocument;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AbstractDocument } from '../../../abstract/abstract.document';
|
|
2
|
+
export declare class ProductDocument extends AbstractDocument {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
price: number;
|
|
6
|
+
brand?: ProductBrand;
|
|
7
|
+
category?: ProductCategory;
|
|
8
|
+
files: ProductFile[];
|
|
9
|
+
}
|
|
10
|
+
interface ProductCategory {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
}
|
|
14
|
+
interface ProductBrand {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
}
|
|
18
|
+
interface ProductFile {
|
|
19
|
+
id: string;
|
|
20
|
+
url: string;
|
|
21
|
+
alt: string;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProductDocument = void 0;
|
|
4
|
+
const abstract_document_1 = require("../../../abstract/abstract.document");
|
|
5
|
+
class ProductDocument extends abstract_document_1.AbstractDocument {
|
|
6
|
+
name = String();
|
|
7
|
+
description = String();
|
|
8
|
+
price = Number();
|
|
9
|
+
brand;
|
|
10
|
+
category;
|
|
11
|
+
files = [];
|
|
12
|
+
}
|
|
13
|
+
exports.ProductDocument = ProductDocument;
|
|
@@ -2,6 +2,7 @@ import { CreateOrganization, UpdateOrganization } from 'auth0';
|
|
|
2
2
|
export declare class OrganizationMetadataValidator {
|
|
3
3
|
address: string;
|
|
4
4
|
publicName: string;
|
|
5
|
+
legalName: string;
|
|
5
6
|
industry: string;
|
|
6
7
|
}
|
|
7
8
|
export declare class CreateOrganizationValidator implements CreateOrganization {
|
|
@@ -15,6 +15,7 @@ const class_validator_1 = require("class-validator");
|
|
|
15
15
|
class OrganizationMetadataValidator {
|
|
16
16
|
address;
|
|
17
17
|
publicName;
|
|
18
|
+
legalName;
|
|
18
19
|
industry;
|
|
19
20
|
}
|
|
20
21
|
__decorate([
|
|
@@ -27,6 +28,11 @@ __decorate([
|
|
|
27
28
|
(0, class_validator_1.IsOptional)(),
|
|
28
29
|
__metadata("design:type", String)
|
|
29
30
|
], OrganizationMetadataValidator.prototype, "publicName", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], OrganizationMetadataValidator.prototype, "legalName", void 0);
|
|
30
36
|
__decorate([
|
|
31
37
|
(0, class_validator_1.IsString)(),
|
|
32
38
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -25,6 +25,7 @@ let OrderEntity = class OrderEntity extends abstract_entity_1.AbstractEntity {
|
|
|
25
25
|
billing;
|
|
26
26
|
shipping;
|
|
27
27
|
payment;
|
|
28
|
+
owner;
|
|
28
29
|
};
|
|
29
30
|
__decorate([
|
|
30
31
|
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true }),
|
|
@@ -50,6 +51,10 @@ __decorate([
|
|
|
50
51
|
(0, mongoose_1.Prop)({ type: mongoose_2.Types.ObjectId, ref: payment_entity_1.PaymentEntity.$index }),
|
|
51
52
|
__metadata("design:type", payment_entity_1.PaymentEntity)
|
|
52
53
|
], OrderEntity.prototype, "payment", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], OrderEntity.prototype, "owner", void 0);
|
|
53
58
|
OrderEntity = __decorate([
|
|
54
59
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
55
60
|
], OrderEntity);
|
|
@@ -39,7 +39,6 @@ __decorate([
|
|
|
39
39
|
__metadata("design:type", shipping_validator_1.CreateShippingValidator)
|
|
40
40
|
], CreateOrderValidator.prototype, "shipping", void 0);
|
|
41
41
|
__decorate([
|
|
42
|
-
(0, class_validator_1.ValidateNested)(),
|
|
43
42
|
(0, class_validator_1.IsEnum)(payment_validator_1.PaymentType),
|
|
44
43
|
__metadata("design:type", String)
|
|
45
44
|
], CreateOrderValidator.prototype, "payment", void 0);
|
package/.output/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@merkaly/api",
|
|
3
|
-
"version": "0.2.2-
|
|
3
|
+
"version": "0.2.2-18",
|
|
4
4
|
"description": "NestJS Backend ApiRest Service",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,12 +31,10 @@
|
|
|
31
31
|
"test:watch": "yarn test -- --watch"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@
|
|
35
|
-
"@nestjs/terminus": "^9.1.1",
|
|
34
|
+
"@elastic/elasticsearch": "^8.4.0",
|
|
36
35
|
"@types/auth0": "^2.35.2",
|
|
37
36
|
"class-transformer": "^0.5.1",
|
|
38
37
|
"class-validator": "^0.13.1",
|
|
39
|
-
"express-session": "^1.17.3",
|
|
40
38
|
"mongoose": "^6"
|
|
41
39
|
},
|
|
42
40
|
"devDependencies": {
|
|
@@ -47,6 +45,8 @@
|
|
|
47
45
|
"@nestjs/common": "^9.0.11",
|
|
48
46
|
"@nestjs/config": "^2.2.0",
|
|
49
47
|
"@nestjs/core": "^9.0.11",
|
|
48
|
+
"@nestjs/elasticsearch": "^9.0.0",
|
|
49
|
+
"@nestjs/event-emitter": "^1.3.1",
|
|
50
50
|
"@nestjs/jwt": "^9.0.0",
|
|
51
51
|
"@nestjs/mongoose": "^9.2.0",
|
|
52
52
|
"@nestjs/passport": "^9.0.0",
|
|
@@ -66,11 +66,12 @@
|
|
|
66
66
|
"@typescript-eslint/eslint-plugin": "4.33.0",
|
|
67
67
|
"@typescript-eslint/parser": "4.33.0",
|
|
68
68
|
"auth0": "^2.42.0",
|
|
69
|
-
"cache-manager": "^
|
|
69
|
+
"cache-manager": "^5.0.0",
|
|
70
70
|
"commitlint": "^17.0.1",
|
|
71
71
|
"eslint": "7.32.0",
|
|
72
72
|
"eslint-plugin-import": "^2.23.4",
|
|
73
73
|
"express": "^4.17.3",
|
|
74
|
+
"express-session": "^1.17.3",
|
|
74
75
|
"husky": "^8.0.1",
|
|
75
76
|
"jest": "27.5.1",
|
|
76
77
|
"nestjs-console": "^8.0.0",
|