@merkaly/api 0.2.2-2 → 0.2.2-21
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 +7 -0
- package/.output/abstract/abstract.document.js +14 -0
- package/.output/abstract/abstract.entity.d.ts +8 -0
- package/.output/abstract/abstract.entity.js +34 -0
- package/.output/abstract/abstract.validator.d.ts +18 -0
- package/.output/abstract/abstract.validator.js +56 -0
- package/.output/modules/assets/asset.entity.d.ts +10 -0
- package/.output/modules/assets/asset.entity.js +52 -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/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.document.d.ts +6 -0
- package/.output/modules/inventory/categories/category.document.js +10 -0
- package/.output/modules/inventory/categories/category.entity.d.ts +9 -0
- package/.output/modules/inventory/categories/category.entity.js +43 -0
- package/.output/modules/inventory/categories/category.validator.d.ts +10 -0
- package/.output/modules/inventory/categories/category.validator.js +55 -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/inventory/products/product.entity.d.ts +13 -0
- 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/inventory/properties/property.entity.d.ts +7 -0
- package/.output/modules/inventory/properties/property.entity.js +38 -0
- package/.output/modules/inventory/properties/property.validator.d.ts +12 -0
- package/.output/modules/inventory/properties/property.validator.js +50 -0
- package/.output/modules/search/search.validator.d.ts +6 -0
- package/.output/modules/search/search.validator.js +39 -0
- package/.output/{module/organization → modules/setting}/connections/connection.validator.d.ts +0 -0
- package/.output/modules/setting/connections/connection.validator.js +35 -0
- package/.output/{module/organization → modules/setting}/members/member.validator.d.ts +0 -0
- package/.output/modules/setting/members/member.validator.js +3 -0
- package/.output/modules/setting/organization/organization.validator.d.ts +16 -0
- package/.output/modules/setting/organization/organization.validator.js +77 -0
- package/.output/modules/setting/payments/payment.entity.d.ts +8 -0
- package/.output/modules/setting/payments/payment.entity.js +38 -0
- package/.output/modules/setting/payments/payment.validator.d.ts +3 -0
- package/.output/modules/setting/payments/payment.validator.js +7 -0
- package/.output/modules/setting/social/social.entity.d.ts +8 -0
- package/.output/modules/setting/social/social.entity.js +38 -0
- package/.output/modules/setting/social/social.validator.d.ts +11 -0
- package/.output/modules/setting/social/social.validator.js +35 -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.document.d.ts +7 -0
- package/.output/modules/store/orders/billing/billing.document.js +11 -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.document.d.ts +6 -0
- package/.output/modules/store/orders/item/item.document.js +9 -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/modules/store/orders/item/item.validator.d.ts +4 -0
- package/.output/modules/store/orders/item/item.validator.js +27 -0
- package/.output/modules/store/orders/order.document.d.ts +21 -0
- package/.output/modules/store/orders/order.document.js +15 -0
- package/.output/modules/store/orders/order.entity.d.ts +16 -0
- package/.output/modules/store/orders/order.entity.js +66 -0
- package/.output/modules/store/orders/order.validator.d.ts +13 -0
- package/.output/modules/store/orders/order.validator.js +53 -0
- package/.output/modules/store/orders/shipping/shipping.document.d.ts +7 -0
- package/.output/modules/store/orders/shipping/shipping.document.js +11 -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.document.d.ts +5 -0
- package/.output/modules/store/orders/status/status.document.js +9 -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.d.ts +8 -0
- package/.output/types.js +2 -0
- package/package.json +42 -44
- package/.output/config/app.config.d.ts +0 -26
- 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/main.d.ts +0 -54
- package/.output/module/auth/auth.repository.d.ts +0 -10
- package/.output/module/auth/auth.repository.d.ts.map +0 -1
- package/.output/module/auth/auth.repository.js +0 -46
- package/.output/module/auth/auth.repository.js.map +0 -1
- 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.entity.d.ts +0 -14
- 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/items/item.validator.d.ts +0 -5
- 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,91 @@
|
|
|
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.UpdateProductValidator = exports.CreateProductValidator = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class CreateProductValidator {
|
|
16
|
+
name;
|
|
17
|
+
description;
|
|
18
|
+
price = 0;
|
|
19
|
+
category;
|
|
20
|
+
brand;
|
|
21
|
+
files = [];
|
|
22
|
+
}
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], CreateProductValidator.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
(0, class_validator_1.IsOptional)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], CreateProductValidator.prototype, "description", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsNumber)(),
|
|
34
|
+
(0, class_validator_1.IsOptional)(),
|
|
35
|
+
__metadata("design:type", Object)
|
|
36
|
+
], CreateProductValidator.prototype, "price", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsOptional)(),
|
|
39
|
+
(0, class_validator_1.IsMongoId)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], CreateProductValidator.prototype, "category", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsOptional)(),
|
|
44
|
+
(0, class_validator_1.IsMongoId)(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], CreateProductValidator.prototype, "brand", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_transformer_1.Transform)(({ value }) => value.map(({ _id }) => _id)),
|
|
49
|
+
(0, class_validator_1.IsOptional)(),
|
|
50
|
+
__metadata("design:type", Array)
|
|
51
|
+
], CreateProductValidator.prototype, "files", void 0);
|
|
52
|
+
exports.CreateProductValidator = CreateProductValidator;
|
|
53
|
+
class UpdateProductValidator {
|
|
54
|
+
name;
|
|
55
|
+
description;
|
|
56
|
+
price;
|
|
57
|
+
category;
|
|
58
|
+
brand;
|
|
59
|
+
files;
|
|
60
|
+
}
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, class_validator_1.IsString)(),
|
|
63
|
+
(0, class_validator_1.IsOptional)(),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], UpdateProductValidator.prototype, "name", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, class_validator_1.IsString)(),
|
|
68
|
+
(0, class_validator_1.IsOptional)(),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], UpdateProductValidator.prototype, "description", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, class_validator_1.IsNumber)(),
|
|
73
|
+
(0, class_validator_1.IsOptional)(),
|
|
74
|
+
__metadata("design:type", Object)
|
|
75
|
+
], UpdateProductValidator.prototype, "price", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, class_validator_1.IsOptional)(),
|
|
78
|
+
(0, class_validator_1.IsMongoId)(),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], UpdateProductValidator.prototype, "category", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, class_validator_1.IsOptional)(),
|
|
83
|
+
(0, class_validator_1.IsMongoId)(),
|
|
84
|
+
__metadata("design:type", String)
|
|
85
|
+
], UpdateProductValidator.prototype, "brand", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, class_transformer_1.Transform)(({ value }) => value.map(({ _id }) => _id)),
|
|
88
|
+
(0, class_validator_1.IsOptional)(),
|
|
89
|
+
__metadata("design:type", Array)
|
|
90
|
+
], UpdateProductValidator.prototype, "files", void 0);
|
|
91
|
+
exports.UpdateProductValidator = UpdateProductValidator;
|
|
@@ -0,0 +1,38 @@
|
|
|
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.PropertyEntity = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const mongoose_2 = require("mongoose");
|
|
15
|
+
const abstract_entity_1 = require("../../../abstract/abstract.entity");
|
|
16
|
+
const property_validator_1 = require("./property.validator");
|
|
17
|
+
let PropertyEntity = class PropertyEntity extends abstract_entity_1.AbstractEntity {
|
|
18
|
+
static $index = 'inventory_properties';
|
|
19
|
+
name;
|
|
20
|
+
title;
|
|
21
|
+
type;
|
|
22
|
+
};
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true, length: 32 }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], PropertyEntity.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, length: 64 }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], PropertyEntity.prototype, "title", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: property_validator_1.PropertyType.STRING }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], PropertyEntity.prototype, "type", void 0);
|
|
35
|
+
PropertyEntity = __decorate([
|
|
36
|
+
(0, mongoose_1.Schema)({ timestamps: true })
|
|
37
|
+
], PropertyEntity);
|
|
38
|
+
exports.PropertyEntity = PropertyEntity;
|
|
@@ -0,0 +1,50 @@
|
|
|
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.UpdatePropertyValidator = exports.CreatePropertyValidator = exports.PropertyType = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
var PropertyType;
|
|
15
|
+
(function (PropertyType) {
|
|
16
|
+
PropertyType["STRING"] = "STRING";
|
|
17
|
+
})(PropertyType = exports.PropertyType || (exports.PropertyType = {}));
|
|
18
|
+
class CreatePropertyValidator {
|
|
19
|
+
name;
|
|
20
|
+
title;
|
|
21
|
+
type;
|
|
22
|
+
}
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], CreatePropertyValidator.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], CreatePropertyValidator.prototype, "title", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], CreatePropertyValidator.prototype, "type", void 0);
|
|
35
|
+
exports.CreatePropertyValidator = CreatePropertyValidator;
|
|
36
|
+
class UpdatePropertyValidator {
|
|
37
|
+
name;
|
|
38
|
+
title;
|
|
39
|
+
}
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
(0, class_validator_1.IsOptional)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], UpdatePropertyValidator.prototype, "name", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_validator_1.IsString)(),
|
|
47
|
+
(0, class_validator_1.IsOptional)(),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], UpdatePropertyValidator.prototype, "title", void 0);
|
|
50
|
+
exports.UpdatePropertyValidator = UpdatePropertyValidator;
|
|
@@ -0,0 +1,39 @@
|
|
|
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.SearchValidator = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class SearchValidator {
|
|
16
|
+
query;
|
|
17
|
+
size;
|
|
18
|
+
from = 0;
|
|
19
|
+
}
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsOptional)(),
|
|
22
|
+
(0, class_transformer_1.Transform)(({ value }) => JSON.parse(value || 'null')),
|
|
23
|
+
__metadata("design:type", Object)
|
|
24
|
+
], SearchValidator.prototype, "query", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsOptional)(),
|
|
27
|
+
(0, class_transformer_1.Transform)(({ value }) => Number(value)),
|
|
28
|
+
(0, class_validator_1.IsInt)(),
|
|
29
|
+
(0, class_validator_1.Min)(1),
|
|
30
|
+
__metadata("design:type", Object)
|
|
31
|
+
], SearchValidator.prototype, "size", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
(0, class_transformer_1.Transform)(({ value }) => Number(value)),
|
|
35
|
+
(0, class_validator_1.IsInt)(),
|
|
36
|
+
(0, class_validator_1.Min)(0),
|
|
37
|
+
__metadata("design:type", Object)
|
|
38
|
+
], SearchValidator.prototype, "from", void 0);
|
|
39
|
+
exports.SearchValidator = SearchValidator;
|
package/.output/{module/organization → modules/setting}/connections/connection.validator.d.ts
RENAMED
|
File without changes
|
|
@@ -0,0 +1,35 @@
|
|
|
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.UpdateConnectionValidator = exports.CreateConnectionValidator = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
require("reflect-metadata");
|
|
15
|
+
class CreateConnectionValidator {
|
|
16
|
+
connection_id;
|
|
17
|
+
assign_membership_on_login;
|
|
18
|
+
}
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsString)(),
|
|
21
|
+
__metadata("design:type", Object)
|
|
22
|
+
], CreateConnectionValidator.prototype, "connection_id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsBoolean)(),
|
|
25
|
+
__metadata("design:type", Object)
|
|
26
|
+
], CreateConnectionValidator.prototype, "assign_membership_on_login", void 0);
|
|
27
|
+
exports.CreateConnectionValidator = CreateConnectionValidator;
|
|
28
|
+
class UpdateConnectionValidator {
|
|
29
|
+
assign_membership_on_login;
|
|
30
|
+
}
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsBoolean)(),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], UpdateConnectionValidator.prototype, "assign_membership_on_login", void 0);
|
|
35
|
+
exports.UpdateConnectionValidator = UpdateConnectionValidator;
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CreateOrganization, UpdateOrganization } from 'auth0';
|
|
2
|
+
export declare class OrganizationMetadataValidator {
|
|
3
|
+
address: string;
|
|
4
|
+
publicName: string;
|
|
5
|
+
legalName: string;
|
|
6
|
+
industry: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class CreateOrganizationValidator implements CreateOrganization {
|
|
9
|
+
name: string;
|
|
10
|
+
email: string;
|
|
11
|
+
password?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class UpdateOrganizationValidator implements UpdateOrganization {
|
|
14
|
+
display_name: string;
|
|
15
|
+
metadata: OrganizationMetadataValidator;
|
|
16
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
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.UpdateOrganizationValidator = exports.CreateOrganizationValidator = exports.OrganizationMetadataValidator = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class OrganizationMetadataValidator {
|
|
16
|
+
address;
|
|
17
|
+
publicName;
|
|
18
|
+
legalName;
|
|
19
|
+
industry;
|
|
20
|
+
}
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsString)(),
|
|
23
|
+
(0, class_validator_1.IsOptional)(),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], OrganizationMetadataValidator.prototype, "address", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
(0, class_validator_1.IsOptional)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
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);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsString)(),
|
|
38
|
+
(0, class_validator_1.IsOptional)(),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], OrganizationMetadataValidator.prototype, "industry", void 0);
|
|
41
|
+
exports.OrganizationMetadataValidator = OrganizationMetadataValidator;
|
|
42
|
+
class CreateOrganizationValidator {
|
|
43
|
+
name;
|
|
44
|
+
email;
|
|
45
|
+
password;
|
|
46
|
+
}
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_validator_1.IsString)(),
|
|
49
|
+
(0, class_validator_1.Length)(3, 255),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], CreateOrganizationValidator.prototype, "name", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_validator_1.IsString)(),
|
|
54
|
+
(0, class_validator_1.IsEmail)(),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], CreateOrganizationValidator.prototype, "email", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, class_validator_1.IsString)(),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], CreateOrganizationValidator.prototype, "password", void 0);
|
|
61
|
+
exports.CreateOrganizationValidator = CreateOrganizationValidator;
|
|
62
|
+
class UpdateOrganizationValidator {
|
|
63
|
+
display_name;
|
|
64
|
+
metadata;
|
|
65
|
+
}
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, class_validator_1.IsString)(),
|
|
68
|
+
(0, class_validator_1.IsOptional)(),
|
|
69
|
+
(0, class_validator_1.Length)(3, 255),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], UpdateOrganizationValidator.prototype, "display_name", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, class_validator_1.ValidateNested)(),
|
|
74
|
+
(0, class_transformer_1.Type)(() => OrganizationMetadataValidator),
|
|
75
|
+
__metadata("design:type", OrganizationMetadataValidator)
|
|
76
|
+
], UpdateOrganizationValidator.prototype, "metadata", void 0);
|
|
77
|
+
exports.UpdateOrganizationValidator = UpdateOrganizationValidator;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../abstract/abstract.entity';
|
|
2
|
+
import { PaymentType } from './payment.validator';
|
|
3
|
+
export declare class PaymentEntity extends AbstractEntity {
|
|
4
|
+
static readonly $index = "settings_payments";
|
|
5
|
+
name: PaymentType;
|
|
6
|
+
active: boolean;
|
|
7
|
+
description: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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.PaymentEntity = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const mongoose_2 = require("mongoose");
|
|
15
|
+
const abstract_entity_1 = require("../../../abstract/abstract.entity");
|
|
16
|
+
const payment_validator_1 = require("./payment.validator");
|
|
17
|
+
let PaymentEntity = class PaymentEntity extends abstract_entity_1.AbstractEntity {
|
|
18
|
+
static $index = 'settings_payments';
|
|
19
|
+
name;
|
|
20
|
+
active = true;
|
|
21
|
+
description;
|
|
22
|
+
};
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, enum: payment_validator_1.PaymentType, required: true, unique: true }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], PaymentEntity.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Boolean, default: true }),
|
|
29
|
+
__metadata("design:type", Object)
|
|
30
|
+
], PaymentEntity.prototype, "active", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: String() }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], PaymentEntity.prototype, "description", void 0);
|
|
35
|
+
PaymentEntity = __decorate([
|
|
36
|
+
(0, mongoose_1.Schema)({ timestamps: true })
|
|
37
|
+
], PaymentEntity);
|
|
38
|
+
exports.PaymentEntity = PaymentEntity;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PaymentType = void 0;
|
|
4
|
+
var PaymentType;
|
|
5
|
+
(function (PaymentType) {
|
|
6
|
+
PaymentType["COD"] = "CASH_ON_DELIVERY";
|
|
7
|
+
})(PaymentType = exports.PaymentType || (exports.PaymentType = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../abstract/abstract.entity';
|
|
2
|
+
import { SocialType } from './social.validator';
|
|
3
|
+
export declare class SocialEntity extends AbstractEntity {
|
|
4
|
+
static readonly $index = "settings_social";
|
|
5
|
+
name: SocialType;
|
|
6
|
+
url: SocialType;
|
|
7
|
+
active: boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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.SocialEntity = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const mongoose_2 = require("mongoose");
|
|
15
|
+
const abstract_entity_1 = require("../../../abstract/abstract.entity");
|
|
16
|
+
const social_validator_1 = require("./social.validator");
|
|
17
|
+
let SocialEntity = class SocialEntity extends abstract_entity_1.AbstractEntity {
|
|
18
|
+
static $index = 'settings_social';
|
|
19
|
+
name;
|
|
20
|
+
url;
|
|
21
|
+
active = true;
|
|
22
|
+
};
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, enum: social_validator_1.SocialType, required: true, unique: true }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], SocialEntity.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], SocialEntity.prototype, "url", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Boolean, default: true }),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], SocialEntity.prototype, "active", void 0);
|
|
35
|
+
SocialEntity = __decorate([
|
|
36
|
+
(0, mongoose_1.Schema)({ timestamps: true })
|
|
37
|
+
], SocialEntity);
|
|
38
|
+
exports.SocialEntity = SocialEntity;
|
|
@@ -0,0 +1,35 @@
|
|
|
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.CreateSocialValidator = exports.SocialType = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
var SocialType;
|
|
15
|
+
(function (SocialType) {
|
|
16
|
+
SocialType["FACEBOOK"] = "facebook";
|
|
17
|
+
SocialType["TWITTER"] = "twitter";
|
|
18
|
+
SocialType["INSTAGRAM"] = "instagram";
|
|
19
|
+
SocialType["TIKTOK"] = "tiktok";
|
|
20
|
+
SocialType["LINKEDIN"] = "linkedin";
|
|
21
|
+
})(SocialType = exports.SocialType || (exports.SocialType = {}));
|
|
22
|
+
class CreateSocialValidator {
|
|
23
|
+
name;
|
|
24
|
+
url;
|
|
25
|
+
}
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
(0, class_validator_1.IsEnum)(SocialType),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], CreateSocialValidator.prototype, "name", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsUrl)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], CreateSocialValidator.prototype, "url", void 0);
|
|
35
|
+
exports.CreateSocialValidator = CreateSocialValidator;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../abstract/abstract.entity';
|
|
2
|
+
import { ItemEntity } from '../orders/item/item.entity';
|
|
3
|
+
import { CartStatus } from './cart.validator';
|
|
4
|
+
export declare class CartEntity extends AbstractEntity {
|
|
5
|
+
static readonly $index = "store_carts";
|
|
6
|
+
user: string;
|
|
7
|
+
status: CartStatus;
|
|
8
|
+
items: ItemEntity[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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.CartEntity = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const mongoose_2 = require("mongoose");
|
|
15
|
+
const abstract_entity_1 = require("../../../abstract/abstract.entity");
|
|
16
|
+
const item_schema_1 = require("../orders/item/item.schema");
|
|
17
|
+
const cart_validator_1 = require("./cart.validator");
|
|
18
|
+
let CartEntity = class CartEntity extends abstract_entity_1.AbstractEntity {
|
|
19
|
+
static $index = 'store_carts';
|
|
20
|
+
user;
|
|
21
|
+
status = cart_validator_1.CartStatus.EMPTY;
|
|
22
|
+
items = [];
|
|
23
|
+
};
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], CartEntity.prototype, "user", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, enum: cart_validator_1.CartStatus, default: cart_validator_1.CartStatus.EMPTY }),
|
|
30
|
+
__metadata("design:type", Object)
|
|
31
|
+
], CartEntity.prototype, "status", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, mongoose_1.Prop)({ type: [item_schema_1.ItemSchema], default: [] }),
|
|
34
|
+
__metadata("design:type", Array)
|
|
35
|
+
], CartEntity.prototype, "items", void 0);
|
|
36
|
+
CartEntity = __decorate([
|
|
37
|
+
(0, mongoose_1.Schema)({ timestamps: true })
|
|
38
|
+
], CartEntity);
|
|
39
|
+
exports.CartEntity = CartEntity;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PaymentType } from '../../setting/payments/payment.validator';
|
|
2
|
+
import { CreateBillingValidator } from '../orders/billing/billing.validator';
|
|
3
|
+
import { CreateShippingValidator } from '../orders/shipping/shipping.validator';
|
|
4
|
+
export declare enum CartStatus {
|
|
5
|
+
EMPTY = "EMPTY",
|
|
6
|
+
FILLED = "FILLED",
|
|
7
|
+
FINISHED = "FINISHED",
|
|
8
|
+
ABANDONED = "ABANDONED"
|
|
9
|
+
}
|
|
10
|
+
export declare class CheckoutCartValidator {
|
|
11
|
+
cart: string;
|
|
12
|
+
billing: CreateBillingValidator;
|
|
13
|
+
shipping: CreateShippingValidator;
|
|
14
|
+
payment: PaymentType;
|
|
15
|
+
}
|
|
16
|
+
export declare class AddItemValidator {
|
|
17
|
+
product: string;
|
|
18
|
+
quantity: number;
|
|
19
|
+
}
|