@merkaly/api 0.2.4-6 → 0.2.4-8
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.entity.d.ts +1 -1
- package/.output/modules/sales/orders/order.entity.d.ts +1 -1
- package/.output/modules/sales/orders/order.validator.js +2 -3
- package/package.json +6 -6
- package/.output/abstract/abstract.entity.js +0 -53
- package/.output/modules/assets/asset.entity.js +0 -69
- package/.output/modules/content/banners/banner.entity.js +0 -54
- package/.output/modules/content/pages/page.entity.js +0 -69
- package/.output/modules/inventory/brands/brand.entity.js +0 -50
- package/.output/modules/inventory/categories/category.entity.js +0 -61
- package/.output/modules/inventory/products/entities/code.entity.js +0 -53
- package/.output/modules/inventory/products/entities/dimension.entity.js +0 -57
- package/.output/modules/inventory/products/entities/price.entity.js +0 -49
- package/.output/modules/inventory/products/entities/seo.entity.js +0 -53
- package/.output/modules/inventory/products/product.entity.js +0 -101
- package/.output/modules/inventory/properties/property.entity.js +0 -55
- package/.output/modules/sales/clients/client.entity.js +0 -64
- package/.output/modules/sales/orders/billing/billing.entity.js +0 -64
- package/.output/modules/sales/orders/billing/entities/address.entity.js +0 -68
- package/.output/modules/sales/orders/billing/entities/customer.entity.js +0 -52
- package/.output/modules/sales/orders/billing/entities/status.entity.js +0 -37
- package/.output/modules/sales/orders/customer/customer.entity.js +0 -52
- package/.output/modules/sales/orders/item/item.entity.js +0 -58
- package/.output/modules/sales/orders/order.entity.js +0 -89
- package/.output/modules/sales/orders/shipping/entities/address.entity.js +0 -68
- package/.output/modules/sales/orders/shipping/entities/customer.entity.js +0 -52
- package/.output/modules/sales/orders/shipping/entities/status.entity.js +0 -37
- package/.output/modules/sales/orders/shipping/shipping.entity.js +0 -68
- package/.output/modules/sales/orders/status/status.entity.js +0 -37
- package/.output/modules/setting/layout/layout.entity.js +0 -46
- package/.output/modules/setting/organization/organization.entity.js +0 -28
- package/.output/modules/setting/theme/theme.entity.js +0 -46
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
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;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.SeoEntity = void 0;
|
|
28
|
-
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
-
var schema_decorator_1 = require("@nestjs/mongoose/dist/decorators/schema.decorator");
|
|
30
|
-
var mongoose_2 = require("mongoose");
|
|
31
|
-
var SeoEntity = (function (_super) {
|
|
32
|
-
__extends(SeoEntity, _super);
|
|
33
|
-
function SeoEntity() {
|
|
34
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
35
|
-
}
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
38
|
-
__metadata("design:type", String)
|
|
39
|
-
], SeoEntity.prototype, "title", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
42
|
-
__metadata("design:type", String)
|
|
43
|
-
], SeoEntity.prototype, "slug", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
46
|
-
__metadata("design:type", String)
|
|
47
|
-
], SeoEntity.prototype, "description", void 0);
|
|
48
|
-
SeoEntity = __decorate([
|
|
49
|
-
(0, schema_decorator_1.Schema)()
|
|
50
|
-
], SeoEntity);
|
|
51
|
-
return SeoEntity;
|
|
52
|
-
}(Map));
|
|
53
|
-
exports.SeoEntity = SeoEntity;
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
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;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.ProductEntity = void 0;
|
|
28
|
-
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
-
var mongoose_2 = require("mongoose");
|
|
30
|
-
var abstract_entity_1 = require("../../../abstract/abstract.entity");
|
|
31
|
-
var asset_entity_1 = require("../../assets/asset.entity");
|
|
32
|
-
var brand_entity_1 = require("../brands/brand.entity");
|
|
33
|
-
var category_entity_1 = require("../categories/category.entity");
|
|
34
|
-
var code_entity_1 = require("./entities/code.entity");
|
|
35
|
-
var dimension_entity_1 = require("./entities/dimension.entity");
|
|
36
|
-
var price_entity_1 = require("./entities/price.entity");
|
|
37
|
-
var seo_entity_1 = require("./entities/seo.entity");
|
|
38
|
-
var ProductEntity = (function (_super) {
|
|
39
|
-
__extends(ProductEntity, _super);
|
|
40
|
-
function ProductEntity() {
|
|
41
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
42
|
-
_this.active = true;
|
|
43
|
-
_this.hashtags = [];
|
|
44
|
-
_this.files = [];
|
|
45
|
-
return _this;
|
|
46
|
-
}
|
|
47
|
-
ProductEntity.$index = 'inventory_products';
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, length: 64 }),
|
|
50
|
-
__metadata("design:type", String)
|
|
51
|
-
], ProductEntity.prototype, "name", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, length: 256 }),
|
|
54
|
-
__metadata("design:type", String)
|
|
55
|
-
], ProductEntity.prototype, "measurement", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Boolean, default: true }),
|
|
58
|
-
__metadata("design:type", Object)
|
|
59
|
-
], ProductEntity.prototype, "active", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, nullable: true }),
|
|
62
|
-
__metadata("design:type", String)
|
|
63
|
-
], ProductEntity.prototype, "description", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Array, default: [] }),
|
|
66
|
-
__metadata("design:type", Array)
|
|
67
|
-
], ProductEntity.prototype, "hashtags", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: category_entity_1.CategoryEntity.$index }),
|
|
70
|
-
__metadata("design:type", category_entity_1.CategoryEntity)
|
|
71
|
-
], ProductEntity.prototype, "category", void 0);
|
|
72
|
-
__decorate([
|
|
73
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: brand_entity_1.BrandEntity.$index }),
|
|
74
|
-
__metadata("design:type", brand_entity_1.BrandEntity)
|
|
75
|
-
], ProductEntity.prototype, "brand", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
(0, mongoose_1.Prop)({ type: [{ type: mongoose_2.Schema.Types.ObjectId, ref: asset_entity_1.AssetEntity.$index }] }),
|
|
78
|
-
__metadata("design:type", Array)
|
|
79
|
-
], ProductEntity.prototype, "files", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: function () { return price_entity_1.PriceEntity; }, default: new Map() }),
|
|
82
|
-
__metadata("design:type", price_entity_1.PriceEntity)
|
|
83
|
-
], ProductEntity.prototype, "price", void 0);
|
|
84
|
-
__decorate([
|
|
85
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: function () { return code_entity_1.CodeEntity; }, default: new Map() }),
|
|
86
|
-
__metadata("design:type", code_entity_1.CodeEntity)
|
|
87
|
-
], ProductEntity.prototype, "code", void 0);
|
|
88
|
-
__decorate([
|
|
89
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: function () { return dimension_entity_1.DimensionEntity; }, default: new Map() }),
|
|
90
|
-
__metadata("design:type", dimension_entity_1.DimensionEntity)
|
|
91
|
-
], ProductEntity.prototype, "dimension", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: function () { return seo_entity_1.SeoEntity; }, default: new Map() }),
|
|
94
|
-
__metadata("design:type", seo_entity_1.SeoEntity)
|
|
95
|
-
], ProductEntity.prototype, "seo", void 0);
|
|
96
|
-
ProductEntity = __decorate([
|
|
97
|
-
(0, mongoose_1.Schema)({ timestamps: true, toJSON: { virtuals: true } })
|
|
98
|
-
], ProductEntity);
|
|
99
|
-
return ProductEntity;
|
|
100
|
-
}(abstract_entity_1.AbstractEntity));
|
|
101
|
-
exports.ProductEntity = ProductEntity;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
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;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.PropertyEntity = void 0;
|
|
28
|
-
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
-
var mongoose_2 = require("mongoose");
|
|
30
|
-
var abstract_entity_1 = require("../../../abstract/abstract.entity");
|
|
31
|
-
var property_validator_1 = require("./property.validator");
|
|
32
|
-
var PropertyEntity = (function (_super) {
|
|
33
|
-
__extends(PropertyEntity, _super);
|
|
34
|
-
function PropertyEntity() {
|
|
35
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
36
|
-
}
|
|
37
|
-
PropertyEntity.$index = 'inventory_properties';
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true, length: 32 }),
|
|
40
|
-
__metadata("design:type", String)
|
|
41
|
-
], PropertyEntity.prototype, "name", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, length: 64 }),
|
|
44
|
-
__metadata("design:type", String)
|
|
45
|
-
], PropertyEntity.prototype, "title", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: property_validator_1.PropertyType.STRING }),
|
|
48
|
-
__metadata("design:type", String)
|
|
49
|
-
], PropertyEntity.prototype, "type", void 0);
|
|
50
|
-
PropertyEntity = __decorate([
|
|
51
|
-
(0, mongoose_1.Schema)({ timestamps: true })
|
|
52
|
-
], PropertyEntity);
|
|
53
|
-
return PropertyEntity;
|
|
54
|
-
}(abstract_entity_1.AbstractEntity));
|
|
55
|
-
exports.PropertyEntity = PropertyEntity;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
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;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.ClientEntity = void 0;
|
|
28
|
-
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
-
var mongoose_2 = require("mongoose");
|
|
30
|
-
var abstract_entity_1 = require("../../../abstract/abstract.entity");
|
|
31
|
-
var ClientEntity = (function (_super) {
|
|
32
|
-
__extends(ClientEntity, _super);
|
|
33
|
-
function ClientEntity() {
|
|
34
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
35
|
-
_this.addresses = [];
|
|
36
|
-
return _this;
|
|
37
|
-
}
|
|
38
|
-
ClientEntity.$index = 'store_clients';
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
|
|
41
|
-
__metadata("design:type", String)
|
|
42
|
-
], ClientEntity.prototype, "name", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, unique: true, required: true }),
|
|
45
|
-
__metadata("design:type", String)
|
|
46
|
-
], ClientEntity.prototype, "email", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: null }),
|
|
49
|
-
__metadata("design:type", String)
|
|
50
|
-
], ClientEntity.prototype, "phone", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, unique: true }),
|
|
53
|
-
__metadata("design:type", String)
|
|
54
|
-
], ClientEntity.prototype, "identificationNumber", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Array, default: [] }),
|
|
57
|
-
__metadata("design:type", Array)
|
|
58
|
-
], ClientEntity.prototype, "addresses", void 0);
|
|
59
|
-
ClientEntity = __decorate([
|
|
60
|
-
(0, mongoose_1.Schema)({ timestamps: true })
|
|
61
|
-
], ClientEntity);
|
|
62
|
-
return ClientEntity;
|
|
63
|
-
}(abstract_entity_1.AbstractEntity));
|
|
64
|
-
exports.ClientEntity = ClientEntity;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
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;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.BillingEntity = void 0;
|
|
28
|
-
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
-
var schema_decorator_1 = require("@nestjs/mongoose/dist/decorators/schema.decorator");
|
|
30
|
-
var mongoose_2 = require("mongoose");
|
|
31
|
-
var billing_types_1 = require("./billing.types");
|
|
32
|
-
var address_entity_1 = require("./entities/address.entity");
|
|
33
|
-
var customer_entity_1 = require("./entities/customer.entity");
|
|
34
|
-
var BillingEntity = (function (_super) {
|
|
35
|
-
__extends(BillingEntity, _super);
|
|
36
|
-
function BillingEntity() {
|
|
37
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
38
|
-
_this.address = new address_entity_1.BillingAddressEntity();
|
|
39
|
-
_this.customer = new customer_entity_1.BillingCustomerEntity();
|
|
40
|
-
_this.status = [];
|
|
41
|
-
return _this;
|
|
42
|
-
}
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: function () { return address_entity_1.BillingAddressEntity; }, default: new address_entity_1.BillingAddressEntity() }),
|
|
45
|
-
__metadata("design:type", Object)
|
|
46
|
-
], BillingEntity.prototype, "address", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: function () { return customer_entity_1.BillingCustomerEntity; }, default: new customer_entity_1.BillingCustomerEntity() }),
|
|
49
|
-
__metadata("design:type", Object)
|
|
50
|
-
], BillingEntity.prototype, "customer", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, enum: billing_types_1.BillingMethod, required: true }),
|
|
53
|
-
__metadata("design:type", String)
|
|
54
|
-
], BillingEntity.prototype, "method", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Array, default: [] }),
|
|
57
|
-
__metadata("design:type", Array)
|
|
58
|
-
], BillingEntity.prototype, "status", void 0);
|
|
59
|
-
BillingEntity = __decorate([
|
|
60
|
-
(0, schema_decorator_1.Schema)({})
|
|
61
|
-
], BillingEntity);
|
|
62
|
-
return BillingEntity;
|
|
63
|
-
}(Map));
|
|
64
|
-
exports.BillingEntity = BillingEntity;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
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;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.BillingAddressEntity = void 0;
|
|
28
|
-
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
-
var mongoose_2 = require("mongoose");
|
|
30
|
-
var BillingAddressEntity = (function (_super) {
|
|
31
|
-
__extends(BillingAddressEntity, _super);
|
|
32
|
-
function BillingAddressEntity() {
|
|
33
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
34
|
-
}
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
|
|
37
|
-
__metadata("design:type", String)
|
|
38
|
-
], BillingAddressEntity.prototype, "country", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
|
|
41
|
-
__metadata("design:type", String)
|
|
42
|
-
], BillingAddressEntity.prototype, "code", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
|
|
45
|
-
__metadata("design:type", String)
|
|
46
|
-
], BillingAddressEntity.prototype, "street", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
49
|
-
__metadata("design:type", String)
|
|
50
|
-
], BillingAddressEntity.prototype, "number", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
53
|
-
__metadata("design:type", String)
|
|
54
|
-
], BillingAddressEntity.prototype, "complement", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
|
|
57
|
-
__metadata("design:type", String)
|
|
58
|
-
], BillingAddressEntity.prototype, "city", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
|
|
61
|
-
__metadata("design:type", String)
|
|
62
|
-
], BillingAddressEntity.prototype, "state", void 0);
|
|
63
|
-
BillingAddressEntity = __decorate([
|
|
64
|
-
(0, mongoose_1.Schema)()
|
|
65
|
-
], BillingAddressEntity);
|
|
66
|
-
return BillingAddressEntity;
|
|
67
|
-
}(Map));
|
|
68
|
-
exports.BillingAddressEntity = BillingAddressEntity;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
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;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.BillingCustomerEntity = void 0;
|
|
28
|
-
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
-
var mongoose_2 = require("mongoose");
|
|
30
|
-
var BillingCustomerEntity = (function (_super) {
|
|
31
|
-
__extends(BillingCustomerEntity, _super);
|
|
32
|
-
function BillingCustomerEntity() {
|
|
33
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
34
|
-
}
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
|
|
37
|
-
__metadata("design:type", String)
|
|
38
|
-
], BillingCustomerEntity.prototype, "name", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
41
|
-
__metadata("design:type", String)
|
|
42
|
-
], BillingCustomerEntity.prototype, "email", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
45
|
-
__metadata("design:type", String)
|
|
46
|
-
], BillingCustomerEntity.prototype, "phone", void 0);
|
|
47
|
-
BillingCustomerEntity = __decorate([
|
|
48
|
-
(0, mongoose_1.Schema)({})
|
|
49
|
-
], BillingCustomerEntity);
|
|
50
|
-
return BillingCustomerEntity;
|
|
51
|
-
}(Map));
|
|
52
|
-
exports.BillingCustomerEntity = BillingCustomerEntity;
|
|
@@ -1,37 +0,0 @@
|
|
|
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.BillingStatusEntity = void 0;
|
|
13
|
-
var mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
-
var schema_decorator_1 = require("@nestjs/mongoose/dist/decorators/schema.decorator");
|
|
15
|
-
var mongoose_2 = require("mongoose");
|
|
16
|
-
var billing_types_1 = require("../billing.types");
|
|
17
|
-
var BillingStatusEntity = (function () {
|
|
18
|
-
function BillingStatusEntity() {
|
|
19
|
-
}
|
|
20
|
-
__decorate([
|
|
21
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, enum: billing_types_1.BillingStatus, required: true }),
|
|
22
|
-
__metadata("design:type", String)
|
|
23
|
-
], BillingStatusEntity.prototype, "name", void 0);
|
|
24
|
-
__decorate([
|
|
25
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
26
|
-
__metadata("design:type", String)
|
|
27
|
-
], BillingStatusEntity.prototype, "user", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date }),
|
|
30
|
-
__metadata("design:type", Object)
|
|
31
|
-
], BillingStatusEntity.prototype, "date", void 0);
|
|
32
|
-
BillingStatusEntity = __decorate([
|
|
33
|
-
(0, schema_decorator_1.Schema)({ timestamps: true })
|
|
34
|
-
], BillingStatusEntity);
|
|
35
|
-
return BillingStatusEntity;
|
|
36
|
-
}());
|
|
37
|
-
exports.BillingStatusEntity = BillingStatusEntity;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
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;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.CustomerEntity = void 0;
|
|
28
|
-
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
-
var mongoose_2 = require("mongoose");
|
|
30
|
-
var CustomerEntity = (function (_super) {
|
|
31
|
-
__extends(CustomerEntity, _super);
|
|
32
|
-
function CustomerEntity() {
|
|
33
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
34
|
-
}
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
|
|
37
|
-
__metadata("design:type", String)
|
|
38
|
-
], CustomerEntity.prototype, "name", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
41
|
-
__metadata("design:type", String)
|
|
42
|
-
], CustomerEntity.prototype, "email", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
45
|
-
__metadata("design:type", String)
|
|
46
|
-
], CustomerEntity.prototype, "phone", void 0);
|
|
47
|
-
CustomerEntity = __decorate([
|
|
48
|
-
(0, mongoose_1.Schema)()
|
|
49
|
-
], CustomerEntity);
|
|
50
|
-
return CustomerEntity;
|
|
51
|
-
}(Map));
|
|
52
|
-
exports.CustomerEntity = CustomerEntity;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
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;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.ItemEntity = void 0;
|
|
28
|
-
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
-
var mongoose_2 = require("mongoose");
|
|
30
|
-
var abstract_entity_1 = require("../../../../abstract/abstract.entity");
|
|
31
|
-
var product_entity_1 = require("../../../inventory/products/product.entity");
|
|
32
|
-
var ItemEntity = (function (_super) {
|
|
33
|
-
__extends(ItemEntity, _super);
|
|
34
|
-
function ItemEntity() {
|
|
35
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
36
|
-
}
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number, default: 1 }),
|
|
39
|
-
__metadata("design:type", Number)
|
|
40
|
-
], ItemEntity.prototype, "quantity", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number, default: 0 }),
|
|
43
|
-
__metadata("design:type", Number)
|
|
44
|
-
], ItemEntity.prototype, "price", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number, default: 0 }),
|
|
47
|
-
__metadata("design:type", Number)
|
|
48
|
-
], ItemEntity.prototype, "refund", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Types.ObjectId, ref: product_entity_1.ProductEntity.$index, required: true }),
|
|
51
|
-
__metadata("design:type", product_entity_1.ProductEntity)
|
|
52
|
-
], ItemEntity.prototype, "product", void 0);
|
|
53
|
-
ItemEntity = __decorate([
|
|
54
|
-
(0, mongoose_1.Schema)({ timestamps: true, toJSON: { virtuals: true } })
|
|
55
|
-
], ItemEntity);
|
|
56
|
-
return ItemEntity;
|
|
57
|
-
}(abstract_entity_1.AbstractEntity));
|
|
58
|
-
exports.ItemEntity = ItemEntity;
|