@merkaly/api 0.2.2-1 → 0.2.2-11
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/configs/app.entity.d.ts +8 -0
- package/.output/configs/app.entity.js +34 -0
- package/.output/main.d.ts +0 -54
- package/.output/modules/assets/asset.entity.d.ts +10 -0
- package/.output/modules/assets/asset.entity.js +52 -0
- package/.output/{module/organization → modules/auth}/connections/connection.validator.d.ts +0 -0
- package/.output/modules/auth/connections/connection.validator.js +35 -0
- package/.output/{module/organization → modules/auth}/members/member.validator.d.ts +0 -0
- package/.output/modules/auth/members/member.validator.js +3 -0
- package/.output/modules/auth/organizations/organization.controller.d.ts +16 -0
- package/.output/modules/auth/organizations/organization.controller.d.ts.map +1 -0
- package/.output/modules/auth/organizations/organization.controller.js +101 -0
- package/.output/modules/auth/organizations/organization.controller.js.map +1 -0
- package/.output/modules/auth/organizations/organization.module.d.ts +9 -0
- package/.output/modules/auth/organizations/organization.module.d.ts.map +1 -0
- package/.output/modules/auth/organizations/organization.module.js +24 -0
- package/.output/modules/auth/organizations/organization.module.js.map +1 -0
- package/.output/modules/auth/organizations/organization.repository.d.ts +9 -0
- package/.output/modules/auth/organizations/organization.repository.d.ts.map +1 -0
- package/.output/modules/auth/organizations/organization.repository.js +42 -0
- package/.output/modules/auth/organizations/organization.repository.js.map +1 -0
- package/.output/modules/auth/organizations/organization.validator.d.ts +7 -0
- package/.output/modules/auth/organizations/organization.validator.d.ts.map +1 -0
- package/.output/modules/auth/organizations/organization.validator.js +22 -0
- package/.output/modules/auth/organizations/organization.validator.js.map +1 -0
- package/.output/modules/inventory/brands/brand.entity.d.ts +6 -0
- package/.output/modules/inventory/brands/brand.entity.js +32 -0
- package/.output/modules/inventory/brands/brand.validator.d.ts +8 -0
- package/.output/modules/inventory/brands/brand.validator.js +43 -0
- package/.output/modules/inventory/categories/category.entity.d.ts +6 -0
- package/.output/modules/inventory/categories/category.entity.js +32 -0
- package/.output/modules/inventory/categories/category.validator.d.ts +8 -0
- package/.output/modules/inventory/categories/category.validator.js +43 -0
- package/.output/{module → modules}/inventory/products/product.entity.d.ts +5 -6
- package/.output/modules/inventory/products/product.entity.js +55 -0
- package/.output/modules/inventory/products/product.validator.d.ts +17 -0
- package/.output/modules/inventory/products/product.validator.js +91 -0
- package/.output/modules/settings/organization/organization.entity.d.ts +10 -0
- package/.output/modules/settings/organization/organization.entity.d.ts.map +1 -0
- package/.output/modules/settings/organization/organization.entity.js +11 -0
- package/.output/modules/settings/organization/organization.entity.js.map +1 -0
- package/.output/modules/settings/organization/organization.validator.d.ts +15 -0
- package/.output/modules/settings/organization/organization.validator.js +71 -0
- package/.output/modules/settings/organizations/organization.controller.d.ts +16 -0
- package/.output/modules/settings/organizations/organization.controller.d.ts.map +1 -0
- package/.output/modules/settings/organizations/organization.controller.js +101 -0
- package/.output/modules/settings/organizations/organization.controller.js.map +1 -0
- package/.output/modules/settings/organizations/organization.module.d.ts +9 -0
- package/.output/modules/settings/organizations/organization.module.d.ts.map +1 -0
- package/.output/modules/settings/organizations/organization.module.js +24 -0
- package/.output/modules/settings/organizations/organization.module.js.map +1 -0
- package/.output/modules/settings/organizations/organization.repository.d.ts +9 -0
- package/.output/modules/settings/organizations/organization.repository.d.ts.map +1 -0
- package/.output/modules/settings/organizations/organization.repository.js +42 -0
- package/.output/modules/settings/organizations/organization.repository.js.map +1 -0
- package/.output/modules/settings/organizations/organization.validator.d.ts +7 -0
- package/.output/modules/settings/organizations/organization.validator.d.ts.map +1 -0
- package/.output/modules/settings/organizations/organization.validator.js +22 -0
- package/.output/modules/settings/organizations/organization.validator.js.map +1 -0
- package/.output/modules/settings/payments/payment.entity.d.ts +8 -0
- package/.output/modules/settings/payments/payment.entity.js +38 -0
- package/.output/modules/settings/payments/payment.validator.d.ts +3 -0
- package/.output/modules/settings/payments/payment.validator.js +7 -0
- package/.output/modules/store/cart/cart.entity.d.ts +9 -0
- package/.output/modules/store/cart/cart.entity.js +39 -0
- package/.output/modules/store/cart/cart.validator.d.ts +19 -0
- package/.output/modules/store/cart/cart.validator.js +64 -0
- package/.output/modules/store/orders/billing/billing.entity.d.ts +7 -0
- package/.output/modules/store/orders/billing/billing.entity.js +46 -0
- package/.output/modules/store/orders/billing/billing.validator.d.ts +7 -0
- package/.output/modules/store/orders/billing/billing.validator.js +44 -0
- package/.output/modules/store/orders/item/item.entity.d.ts +7 -0
- package/.output/modules/store/orders/item/item.entity.js +37 -0
- package/.output/modules/store/orders/item/item.schema.d.ts +27 -0
- package/.output/modules/store/orders/item/item.schema.js +6 -0
- package/.output/{module/store/items → modules/store/orders/item}/item.validator.d.ts +1 -1
- package/.output/modules/store/orders/item/item.validator.js +27 -0
- package/.output/modules/store/orders/order.entity.d.ts +15 -0
- package/.output/modules/store/orders/order.entity.js +56 -0
- package/.output/modules/store/orders/order.validator.d.ts +12 -0
- package/.output/modules/store/orders/order.validator.js +49 -0
- package/.output/modules/store/orders/shipping/shipping.entity.d.ts +7 -0
- package/.output/modules/store/orders/shipping/shipping.entity.js +46 -0
- package/.output/modules/store/orders/shipping/shipping.validator.d.ts +7 -0
- package/.output/modules/store/orders/shipping/shipping.validator.js +44 -0
- package/.output/modules/store/orders/status/status.entity.d.ts +6 -0
- package/.output/modules/store/orders/status/status.entity.js +37 -0
- package/.output/modules/store/orders/status/status.validator.d.ts +8 -0
- package/.output/modules/store/orders/status/status.validator.js +12 -0
- package/.output/types.js +0 -0
- package/package.json +39 -46
- package/.output/config/app.config.d.ts +0 -27
- package/.output/config/app.document.d.ts +0 -10
- package/.output/config/app.entity.d.ts +0 -8
- package/.output/config/app.repository.d.ts +0 -25
- package/.output/config/app.validator.d.ts +0 -10
- package/.output/module/inventory/brands/brand.document.d.ts +0 -7
- package/.output/module/inventory/brands/brand.entity.d.ts +0 -7
- package/.output/module/inventory/brands/brand.validator.d.ts +0 -12
- package/.output/module/inventory/categories/category.document.d.ts +0 -7
- package/.output/module/inventory/categories/category.entity.d.ts +0 -7
- package/.output/module/inventory/categories/category.validator.d.ts +0 -12
- package/.output/module/inventory/media/media.document.d.ts +0 -7
- package/.output/module/inventory/media/media.entity.d.ts +0 -7
- package/.output/module/inventory/media/media.validator.d.ts +0 -10
- package/.output/module/inventory/products/product.document.d.ts +0 -12
- package/.output/module/inventory/products/product.validator.d.ts +0 -21
- package/.output/module/inventory/variants/variant.document.d.ts +0 -6
- package/.output/module/inventory/variants/variant.entity.d.ts +0 -6
- package/.output/module/inventory/variants/variant.validator.d.ts +0 -12
- package/.output/module/store/carts/cart.document.d.ts +0 -6
- package/.output/module/store/carts/cart.entity.d.ts +0 -6
- package/.output/module/store/carts/cart.validator.d.ts +0 -8
- package/.output/module/store/items/item.document.d.ts +0 -8
- package/.output/module/store/items/item.entity.d.ts +0 -8
- package/.output/module/store/orders/order.document.d.ts +0 -7
- package/.output/module/store/orders/order.entity.d.ts +0 -5
- package/.output/module/store/orders/order.validator.d.ts +0 -8
|
@@ -0,0 +1,44 @@
|
|
|
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.CreateShippingValidator = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class CreateShippingValidator {
|
|
15
|
+
name;
|
|
16
|
+
email;
|
|
17
|
+
phone;
|
|
18
|
+
address;
|
|
19
|
+
code;
|
|
20
|
+
}
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsString)(),
|
|
23
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], CreateShippingValidator.prototype, "name", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsEmail)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], CreateShippingValidator.prototype, "email", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsString)(),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], CreateShippingValidator.prototype, "phone", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_validator_1.IsString)(),
|
|
36
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], CreateShippingValidator.prototype, "address", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsString)(),
|
|
41
|
+
(0, class_validator_1.IsOptional)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], CreateShippingValidator.prototype, "code", void 0);
|
|
44
|
+
exports.CreateShippingValidator = CreateShippingValidator;
|
|
@@ -0,0 +1,37 @@
|
|
|
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.StatusEntity = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const schema_decorator_1 = require("@nestjs/mongoose/dist/decorators/schema.decorator");
|
|
15
|
+
const mongoose_2 = require("mongoose");
|
|
16
|
+
const status_validator_1 = require("./status.validator");
|
|
17
|
+
let StatusEntity = class StatusEntity {
|
|
18
|
+
name;
|
|
19
|
+
user;
|
|
20
|
+
date = new Date();
|
|
21
|
+
};
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, enum: status_validator_1.StatusType, required: true }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], StatusEntity.prototype, "name", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], StatusEntity.prototype, "user", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date, default: new Date() }),
|
|
32
|
+
__metadata("design:type", Object)
|
|
33
|
+
], StatusEntity.prototype, "date", void 0);
|
|
34
|
+
StatusEntity = __decorate([
|
|
35
|
+
(0, schema_decorator_1.Schema)({ timestamps: true })
|
|
36
|
+
], StatusEntity);
|
|
37
|
+
exports.StatusEntity = StatusEntity;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StatusType = void 0;
|
|
4
|
+
var StatusType;
|
|
5
|
+
(function (StatusType) {
|
|
6
|
+
StatusType["CREATED"] = "CREATED";
|
|
7
|
+
StatusType["APPROVED"] = "APPROVED";
|
|
8
|
+
StatusType["ON_HOLD"] = "ON_HOLD";
|
|
9
|
+
StatusType["IN_PROGRESS"] = "IN_PROGRESS";
|
|
10
|
+
StatusType["COMPLETED"] = "COMPLETED";
|
|
11
|
+
StatusType["CANCELED"] = "CANCELED";
|
|
12
|
+
})(StatusType = exports.StatusType || (exports.StatusType = {}));
|
package/.output/types.js
ADDED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@merkaly/api",
|
|
3
|
-
"version": "0.2.2-
|
|
3
|
+
"version": "0.2.2-11",
|
|
4
4
|
"description": "NestJS Backend ApiRest Service",
|
|
5
|
-
"
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/merkaly-io/api.git"
|
|
8
|
+
},
|
|
6
9
|
"license": "UNLICENSED",
|
|
10
|
+
"author": "Randy Tellez Galan <kronhyx@gmail.com>",
|
|
7
11
|
"main": "./.output/main",
|
|
8
12
|
"types": "./.output/types.d.ts",
|
|
9
13
|
"files": [
|
|
@@ -11,91 +15,80 @@
|
|
|
11
15
|
],
|
|
12
16
|
"scripts": {
|
|
13
17
|
"prebuild": "yarn run clean",
|
|
14
|
-
"prepack": ".bin/package.sh",
|
|
15
|
-
"postpack": "yarn run clean",
|
|
16
18
|
"build": "nest build",
|
|
17
19
|
"clean": "tsc -b --clean",
|
|
18
|
-
"start": "nest start --preserveWatchOutput",
|
|
19
|
-
"dev": "yarn start --watch",
|
|
20
20
|
"console": "ts-node -r tsconfig-paths/register ./src/console.ts",
|
|
21
|
-
"
|
|
22
|
-
"lint": "eslint \"{src,
|
|
21
|
+
"dev": "yarn start --watch",
|
|
22
|
+
"lint": "eslint \"{src,a}/**/*.ts\" . ",
|
|
23
|
+
"prepack": ".bin/package.sh",
|
|
24
|
+
"postpack": "yarn run clean",
|
|
25
|
+
"semantic-release": "yarn run build:package && semantic-release",
|
|
26
|
+
"start": "nest start",
|
|
27
|
+
"start:prod": "node .output/main.js",
|
|
23
28
|
"test": "jest",
|
|
24
|
-
"test:watch": "yarn test -- --watch",
|
|
25
29
|
"test:cov": "yarn test -- --coverage",
|
|
26
30
|
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
|
27
|
-
"
|
|
31
|
+
"test:watch": "yarn test -- --watch"
|
|
28
32
|
},
|
|
29
33
|
"dependencies": {
|
|
30
34
|
"@types/auth0": "^2.35.2",
|
|
31
|
-
"auth0": "^2.42.0",
|
|
32
35
|
"class-transformer": "^0.5.1",
|
|
33
|
-
"class-validator": "^0.13.1"
|
|
34
|
-
"es-mapping-ts": "^1.0.1",
|
|
35
|
-
"reflect-metadata": "^0.1.13",
|
|
36
|
-
"stripe": "^9.11.0"
|
|
36
|
+
"class-validator": "^0.13.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@commitlint/config-conventional": "^17.0.0",
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"@nestjs/cli": "
|
|
43
|
-
"@nestjs/common": "
|
|
44
|
-
"@nestjs/config": "^2.
|
|
45
|
-
"@nestjs/core": "
|
|
46
|
-
"@nestjs/
|
|
47
|
-
"@nestjs/
|
|
48
|
-
"@nestjs/
|
|
49
|
-
"@nestjs/
|
|
50
|
-
"@nestjs/
|
|
51
|
-
"@nestjs/
|
|
52
|
-
"@nestjs/
|
|
53
|
-
"@
|
|
54
|
-
"@nestjs/typeorm": "^8.1.2",
|
|
55
|
-
"@semantic-release/exec": "^6.0.1",
|
|
56
|
-
"@semantic-release/git": "^10.0.0",
|
|
40
|
+
"@faker-js/faker": "^7.5.0",
|
|
41
|
+
"@google-cloud/storage": "^6.4.1",
|
|
42
|
+
"@nestjs/cli": "^9.1.1",
|
|
43
|
+
"@nestjs/common": "^9.0.11",
|
|
44
|
+
"@nestjs/config": "^2.2.0",
|
|
45
|
+
"@nestjs/core": "^9.0.11",
|
|
46
|
+
"@nestjs/jwt": "^9.0.0",
|
|
47
|
+
"@nestjs/mongoose": "^9.2.0",
|
|
48
|
+
"@nestjs/passport": "^9.0.0",
|
|
49
|
+
"@nestjs/platform-express": "^9.0.11",
|
|
50
|
+
"@nestjs/schematics": "^9.0.1",
|
|
51
|
+
"@nestjs/swagger": "^6.1.0",
|
|
52
|
+
"@nestjs/testing": "^9.0.11",
|
|
53
|
+
"@types/cache-manager": "^4.0.1",
|
|
57
54
|
"@types/express": "^4.17.12",
|
|
58
|
-
"@types/faker": "^5.5.9",
|
|
59
55
|
"@types/jest": "^27.0.0",
|
|
60
56
|
"@types/multer": "^1.4.7",
|
|
61
57
|
"@types/node": "^18.0.0",
|
|
62
58
|
"@types/passport-jwt": "^3.0.5",
|
|
63
59
|
"@types/supertest": "^2.0.11",
|
|
60
|
+
"@types/uuid": "^8.3.4",
|
|
64
61
|
"@typescript-eslint/eslint-plugin": "4.33.0",
|
|
65
62
|
"@typescript-eslint/parser": "4.33.0",
|
|
63
|
+
"auth0": "^2.42.0",
|
|
64
|
+
"cache-manager": "^4.1.0",
|
|
66
65
|
"commitlint": "^17.0.1",
|
|
67
66
|
"eslint": "7.32.0",
|
|
68
67
|
"eslint-plugin-import": "^2.23.4",
|
|
69
68
|
"express": "^4.17.3",
|
|
70
|
-
"faker": "^5.5.3",
|
|
71
69
|
"husky": "^8.0.1",
|
|
72
70
|
"jest": "27.5.1",
|
|
73
|
-
"
|
|
74
|
-
"nestjs-console": "^
|
|
71
|
+
"mongoose": "^6",
|
|
72
|
+
"nestjs-console": "^8.0.0",
|
|
75
73
|
"passport": "^0.6.0",
|
|
76
74
|
"passport-jwt": "^4.0.0",
|
|
75
|
+
"reflect-metadata": "^0.1.13",
|
|
77
76
|
"rimraf": "^3.0.2",
|
|
78
77
|
"rxjs": "^7.2.0",
|
|
79
|
-
"
|
|
78
|
+
"short-unique-id": "^4.4.4",
|
|
80
79
|
"supertest": "^6.1.3",
|
|
81
80
|
"swagger-ui-express": "^4.3.0",
|
|
82
81
|
"ts-jest": "27.1.3",
|
|
83
82
|
"ts-loader": "^9.2.3",
|
|
84
83
|
"ts-node": "^10.0.0",
|
|
85
84
|
"tsconfig-paths": "^4.0.0",
|
|
86
|
-
"
|
|
87
|
-
"typeorm-naming-strategies": "^4.0.0",
|
|
88
|
-
"typescript": "^4.6.2",
|
|
85
|
+
"typescript": "4.4.4",
|
|
89
86
|
"webpack": "^5"
|
|
90
87
|
},
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"url": "https://github.com/sk-merkaly/api.git"
|
|
88
|
+
"engines": {
|
|
89
|
+
"node": "16"
|
|
94
90
|
},
|
|
95
91
|
"publishConfig": {
|
|
96
92
|
"access": "public"
|
|
97
|
-
},
|
|
98
|
-
"engines": {
|
|
99
|
-
"node": "16"
|
|
100
93
|
}
|
|
101
94
|
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { HttpModuleOptions } from '@nestjs/axios/dist/interfaces';
|
|
2
|
-
import { ElasticsearchModuleOptions } from '@nestjs/elasticsearch';
|
|
3
|
-
import { TypeOrmModuleOptions } from '@nestjs/typeorm/dist/interfaces/typeorm-options.interface';
|
|
4
|
-
export declare abstract class AppConfig {
|
|
5
|
-
static get elasticsearch(): ElasticsearchModuleOptions;
|
|
6
|
-
static get axios(): HttpModuleOptions;
|
|
7
|
-
static get auth0(): {
|
|
8
|
-
domain: string;
|
|
9
|
-
audience: string;
|
|
10
|
-
client: string;
|
|
11
|
-
secret: string;
|
|
12
|
-
realm: string;
|
|
13
|
-
};
|
|
14
|
-
static get sentry(): {
|
|
15
|
-
dsn: string;
|
|
16
|
-
debug: boolean;
|
|
17
|
-
environment: string;
|
|
18
|
-
};
|
|
19
|
-
static get server(): {
|
|
20
|
-
port: string | number;
|
|
21
|
-
name: string;
|
|
22
|
-
description: string;
|
|
23
|
-
version: string;
|
|
24
|
-
tenant: string;
|
|
25
|
-
};
|
|
26
|
-
static get database(): TypeOrmModuleOptions;
|
|
27
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AppEntity } from './app.entity';
|
|
2
|
-
export declare abstract class AppDocument {
|
|
3
|
-
protected abstract transform?(entity: unknown): this;
|
|
4
|
-
$id: string;
|
|
5
|
-
$createdAt: Date;
|
|
6
|
-
$updatedAt: Date;
|
|
7
|
-
$deletedAt: Date;
|
|
8
|
-
private _routing;
|
|
9
|
-
serialize?(entity: AppEntity): this;
|
|
10
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { GetResponse, Id, QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
|
2
|
-
import { ElasticsearchService } from '@nestjs/elasticsearch';
|
|
3
|
-
import { Repository } from 'typeorm';
|
|
4
|
-
import { AppDocument } from './app.document';
|
|
5
|
-
import { AppEntity } from './app.entity';
|
|
6
|
-
import { AppValidator } from './app.validator';
|
|
7
|
-
export interface SearchParams {
|
|
8
|
-
page?: number;
|
|
9
|
-
limit?: number;
|
|
10
|
-
query?: QueryDslQueryContainer;
|
|
11
|
-
}
|
|
12
|
-
export declare abstract class AppRepository<E extends AppEntity, D extends AppDocument> {
|
|
13
|
-
protected readonly $elastic: ElasticsearchService;
|
|
14
|
-
protected abstract $document: D;
|
|
15
|
-
protected abstract repository: Repository<E>;
|
|
16
|
-
protected get $index(): string;
|
|
17
|
-
protected get $routing(): string;
|
|
18
|
-
find(search?: SearchParams): Promise<import("@elastic/elasticsearch/lib/api/types").SearchHitsMetadata<D>>;
|
|
19
|
-
create(validator: AppValidator<any>): Promise<GetResponse<D>>;
|
|
20
|
-
read(id: Id): Promise<GetResponse<D>>;
|
|
21
|
-
update(id: Id, validator: AppValidator<any>): Promise<GetResponse<D>>;
|
|
22
|
-
delete(id: Id): Promise<void>;
|
|
23
|
-
protected $create(id: Id, document: D): Promise<GetResponse<D>>;
|
|
24
|
-
protected $update(id: Id, doc: D): Promise<GetResponse<D>>;
|
|
25
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
|
2
|
-
import { AppEntity } from './app.entity';
|
|
3
|
-
export declare abstract class AppValidator<E extends AppEntity> {
|
|
4
|
-
abstract toEntity?(...variadic: unknown[]): E;
|
|
5
|
-
}
|
|
6
|
-
export declare class FindValidator {
|
|
7
|
-
page: number;
|
|
8
|
-
limit: number;
|
|
9
|
-
query?: QueryDslQueryContainer;
|
|
10
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { AppValidator } from '../../../config/app.validator';
|
|
2
|
-
import { BrandEntity } from './brand.entity';
|
|
3
|
-
export declare class CreateBrandValidator extends AppValidator<BrandEntity> {
|
|
4
|
-
name: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
toEntity?(): BrandEntity;
|
|
7
|
-
}
|
|
8
|
-
export declare class UpdateBrandValidator extends AppValidator<BrandEntity> {
|
|
9
|
-
name?: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
toEntity?(entity: BrandEntity): BrandEntity;
|
|
12
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AppDocument } from '../../../config/app.document';
|
|
2
|
-
import { CategoryEntity } from './category.entity';
|
|
3
|
-
export declare class CategoryDocument extends AppDocument {
|
|
4
|
-
name: string;
|
|
5
|
-
description: string;
|
|
6
|
-
protected transform?(entity: CategoryEntity): this;
|
|
7
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { AppValidator } from '../../../config/app.validator';
|
|
2
|
-
import { CategoryEntity } from './category.entity';
|
|
3
|
-
export declare class CreateCategoryValidator extends AppValidator<CategoryEntity> {
|
|
4
|
-
name: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
toEntity?(): CategoryEntity;
|
|
7
|
-
}
|
|
8
|
-
export declare class UpdateCategoryValidator extends AppValidator<CategoryEntity> {
|
|
9
|
-
name: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
toEntity?(entity: CategoryEntity): CategoryEntity;
|
|
12
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AppValidator } from '../../../config/app.validator';
|
|
2
|
-
import { MediaEntity } from './media.entity';
|
|
3
|
-
export declare class CreateMediaValidator extends AppValidator<MediaEntity> {
|
|
4
|
-
name: string;
|
|
5
|
-
toEntity?(): MediaEntity;
|
|
6
|
-
}
|
|
7
|
-
export declare class UpdateMediaValidator extends AppValidator<MediaEntity> {
|
|
8
|
-
name: string;
|
|
9
|
-
toEntity?(entity: MediaEntity): MediaEntity;
|
|
10
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { AppDocument } from '../../../config/app.document';
|
|
2
|
-
import { BrandEntity } from '../brands/brand.entity';
|
|
3
|
-
import { CategoryEntity } from '../categories/category.entity';
|
|
4
|
-
import { ProductEntity } from './product.entity';
|
|
5
|
-
export declare class ProductDocument extends AppDocument {
|
|
6
|
-
name: string;
|
|
7
|
-
description: string;
|
|
8
|
-
category: Pick<CategoryEntity, 'id' | 'name' | 'description'>;
|
|
9
|
-
brand: Pick<BrandEntity, 'id' | 'name' | 'description'>;
|
|
10
|
-
price: number;
|
|
11
|
-
protected transform?(entity: ProductEntity): this;
|
|
12
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Id } from '@elastic/elasticsearch/lib/api/types';
|
|
2
|
-
import { AppValidator } from '../../../config/app.validator';
|
|
3
|
-
import { CreateVariantValidator } from '../variants/variant.validator';
|
|
4
|
-
import { ProductEntity } from './product.entity';
|
|
5
|
-
export declare class CreateProductValidator extends AppValidator<ProductEntity> {
|
|
6
|
-
name: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
price: number;
|
|
9
|
-
category?: string;
|
|
10
|
-
brand?: string;
|
|
11
|
-
variants?: CreateVariantValidator[];
|
|
12
|
-
toEntity?(): ProductEntity;
|
|
13
|
-
}
|
|
14
|
-
export declare class UpdateProductValidator extends AppValidator<ProductEntity> {
|
|
15
|
-
name?: string;
|
|
16
|
-
description?: string;
|
|
17
|
-
price: number;
|
|
18
|
-
category?: Id;
|
|
19
|
-
brand?: Id;
|
|
20
|
-
toEntity?(entity: ProductEntity): ProductEntity;
|
|
21
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { AppValidator } from '../../../config/app.validator';
|
|
2
|
-
import { ProductEntity } from '../products/product.entity';
|
|
3
|
-
import { VariantEntity } from './variant.entity';
|
|
4
|
-
export declare class CreateVariantValidator extends AppValidator<VariantEntity> {
|
|
5
|
-
price: number;
|
|
6
|
-
active: boolean;
|
|
7
|
-
toEntity?(product?: ProductEntity): VariantEntity;
|
|
8
|
-
}
|
|
9
|
-
export declare class UpdateVariantValidator extends AppValidator<VariantEntity> {
|
|
10
|
-
price: number;
|
|
11
|
-
toEntity?(entity: VariantEntity): VariantEntity;
|
|
12
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { AppValidator } from '../../../config/app.validator';
|
|
2
|
-
import { CartEntity } from './cart.entity';
|
|
3
|
-
export declare class CreateCartValidator extends AppValidator<CartEntity> {
|
|
4
|
-
toEntity?(): CartEntity;
|
|
5
|
-
}
|
|
6
|
-
export declare class UpdateCartValidator extends AppValidator<CartEntity> {
|
|
7
|
-
toEntity?(entity: CartEntity): CartEntity;
|
|
8
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { AppDocument } from '../../../config/app.document';
|
|
2
|
-
import { ProductEntity } from '../../inventory/products/product.entity';
|
|
3
|
-
import { ItemEntity } from './item.entity';
|
|
4
|
-
export declare class ItemDocument extends AppDocument {
|
|
5
|
-
product: Pick<ProductEntity, 'id' | 'name' | 'price'>;
|
|
6
|
-
quantity: number;
|
|
7
|
-
protected transform?(entity: ItemEntity): this;
|
|
8
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { AppEntity } from '../../../config/app.entity';
|
|
2
|
-
import { ProductEntity } from '../../inventory/products/product.entity';
|
|
3
|
-
import { CartEntity } from '../carts/cart.entity';
|
|
4
|
-
export declare class ItemEntity extends AppEntity {
|
|
5
|
-
product: ProductEntity;
|
|
6
|
-
quantity: number;
|
|
7
|
-
carts: CartEntity[];
|
|
8
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { AppValidator } from '../../../config/app.validator';
|
|
2
|
-
import { OrderEntity } from './order.entity';
|
|
3
|
-
export declare class CreateOrderValidator extends AppValidator<OrderEntity> {
|
|
4
|
-
toEntity?(): OrderEntity;
|
|
5
|
-
}
|
|
6
|
-
export declare class UpdateOrderValidator extends AppValidator<OrderEntity> {
|
|
7
|
-
toEntity?(entity: OrderEntity): OrderEntity;
|
|
8
|
-
}
|