@merkaly/api 0.2.2-3 → 0.2.2-30
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 +12 -0
- package/.output/abstract/abstract.entity.d.ts +8 -0
- package/.output/abstract/abstract.entity.js +54 -0
- package/.output/abstract/abstract.validator.d.ts +18 -0
- package/.output/abstract/abstract.validator.js +73 -0
- package/.output/modules/assets/asset.entity.d.ts +3 -28
- package/.output/modules/assets/asset.entity.js +69 -0
- package/.output/modules/content/banners/banner.document.d.ts +16 -0
- package/.output/modules/content/banners/banner.document.js +31 -0
- package/.output/modules/content/banners/banner.entity.d.ts +19 -0
- package/.output/modules/content/banners/banner.entity.js +104 -0
- package/.output/modules/content/banners/banner.validator.d.ts +7 -0
- package/.output/modules/content/banners/banner.validator.js +58 -0
- package/.output/modules/content/pages/page.document.d.ts +10 -0
- package/.output/modules/content/pages/page.document.js +32 -0
- package/.output/modules/content/pages/page.entity.d.ts +11 -0
- package/.output/modules/content/pages/page.entity.js +69 -0
- package/.output/modules/content/pages/page.types.d.ts +8 -0
- package/.output/modules/content/pages/page.types.js +13 -0
- package/.output/modules/content/pages/page.validator.d.ts +11 -0
- package/.output/modules/content/pages/page.validator.js +73 -0
- package/.output/modules/insight/validators/order.validator.d.ts +4 -0
- package/.output/modules/insight/validators/order.validator.js +27 -0
- package/.output/modules/inventory/brands/brand.document.d.ts +2 -2
- package/.output/modules/inventory/brands/brand.document.js +30 -0
- package/.output/modules/inventory/brands/brand.entity.d.ts +2 -28
- package/.output/modules/inventory/brands/brand.entity.js +50 -0
- package/.output/modules/inventory/brands/brand.validator.js +45 -0
- package/.output/modules/inventory/categories/category.document.d.ts +3 -2
- package/.output/modules/inventory/categories/category.document.js +31 -0
- package/.output/modules/inventory/categories/category.entity.d.ts +5 -28
- package/.output/modules/inventory/categories/category.entity.js +61 -0
- package/.output/modules/inventory/categories/category.validator.d.ts +2 -0
- package/.output/modules/inventory/categories/category.validator.js +57 -0
- package/.output/modules/inventory/products/entities/code.entity.d.ts +5 -0
- package/.output/modules/inventory/products/entities/code.entity.js +53 -0
- package/.output/modules/inventory/products/entities/dimension.entity.d.ts +6 -0
- package/.output/modules/inventory/products/entities/dimension.entity.js +57 -0
- package/.output/modules/inventory/products/entities/price.entity.d.ts +4 -0
- package/.output/modules/inventory/products/entities/price.entity.js +49 -0
- package/.output/modules/inventory/products/entities/seo.entity.d.ts +5 -0
- package/.output/modules/inventory/products/entities/seo.entity.js +53 -0
- package/.output/modules/inventory/products/product.document.d.ts +19 -8
- package/.output/modules/inventory/products/product.document.js +32 -0
- package/.output/modules/inventory/products/product.entity.d.ts +12 -29
- package/.output/modules/inventory/products/product.entity.js +97 -0
- package/.output/modules/inventory/products/product.validator.d.ts +14 -10
- package/.output/modules/inventory/products/product.validator.js +113 -0
- package/.output/modules/inventory/products/validators/code.validator.d.ts +5 -0
- package/.output/modules/inventory/products/validators/code.validator.js +37 -0
- package/.output/modules/inventory/products/validators/dimension.validator.d.ts +6 -0
- package/.output/modules/inventory/products/validators/dimension.validator.js +43 -0
- package/.output/modules/inventory/products/validators/price.validator.d.ts +4 -0
- package/.output/modules/inventory/products/validators/price.validator.js +30 -0
- package/.output/modules/inventory/products/validators/seo.validator.d.ts +5 -0
- package/.output/modules/inventory/products/validators/seo.validator.js +37 -0
- package/.output/modules/inventory/properties/property.entity.d.ts +7 -0
- package/.output/modules/inventory/properties/property.entity.js +55 -0
- package/.output/modules/inventory/properties/property.validator.d.ts +12 -0
- package/.output/modules/inventory/properties/property.validator.js +51 -0
- package/.output/modules/sales/clients/client.entity.d.ts +12 -0
- package/.output/modules/sales/clients/client.entity.js +73 -0
- package/.output/modules/sales/clients/client.validator.d.ts +12 -0
- package/.output/modules/sales/clients/client.validator.js +67 -0
- package/.output/modules/sales/orders/billing/billing.document.d.ts +7 -0
- package/.output/modules/sales/orders/billing/billing.document.js +9 -0
- package/.output/modules/sales/orders/billing/billing.entity.d.ts +7 -0
- package/.output/modules/sales/orders/billing/billing.entity.js +44 -0
- package/.output/modules/sales/orders/billing/billing.validator.d.ts +7 -0
- package/.output/modules/sales/orders/billing/billing.validator.js +40 -0
- package/.output/modules/sales/orders/item/item.document.d.ts +6 -0
- package/.output/modules/sales/orders/item/item.document.js +9 -0
- package/.output/modules/sales/orders/item/item.entity.d.ts +7 -0
- package/.output/modules/sales/orders/item/item.entity.js +54 -0
- package/.output/modules/{store/orders/order.entity.d.ts → sales/orders/item/item.schema.d.ts} +3 -8
- package/.output/modules/sales/orders/item/item.schema.js +6 -0
- package/.output/modules/sales/orders/item/item.validator.d.ts +4 -0
- package/.output/modules/sales/orders/item/item.validator.js +29 -0
- package/.output/modules/sales/orders/order.entity.d.ts +18 -0
- package/.output/modules/sales/orders/order.entity.js +90 -0
- package/.output/modules/sales/orders/order.validator.d.ts +18 -0
- package/.output/modules/sales/orders/order.validator.js +75 -0
- package/.output/modules/sales/orders/payment/payment.entity.d.ts +4 -0
- package/.output/modules/sales/orders/payment/payment.entity.js +28 -0
- package/.output/modules/{store/carts/cart.entity.d.ts → sales/orders/payment/payment.schema.d.ts} +3 -10
- package/.output/modules/sales/orders/payment/payment.schema.js +6 -0
- package/.output/modules/sales/orders/payment/payment.validator.d.ts +6 -0
- package/.output/modules/sales/orders/payment/payment.validator.js +10 -0
- package/.output/modules/sales/orders/shipping/shipping.document.d.ts +7 -0
- package/.output/modules/sales/orders/shipping/shipping.document.js +9 -0
- package/.output/modules/sales/orders/shipping/shipping.entity.d.ts +7 -0
- package/.output/modules/sales/orders/shipping/shipping.entity.js +44 -0
- package/.output/modules/sales/orders/shipping/shipping.validator.d.ts +7 -0
- package/.output/modules/sales/orders/shipping/shipping.validator.js +40 -0
- package/.output/modules/sales/orders/status/status.document.d.ts +5 -0
- package/.output/modules/sales/orders/status/status.document.js +9 -0
- package/.output/modules/sales/orders/status/status.entity.d.ts +6 -0
- package/.output/modules/sales/orders/status/status.entity.js +37 -0
- package/.output/modules/sales/orders/status/status.validator.d.ts +8 -0
- package/.output/modules/sales/orders/status/status.validator.js +12 -0
- package/.output/modules/search/search.validator.d.ts +6 -0
- package/.output/modules/search/search.validator.js +49 -0
- package/.output/modules/{auth → setting}/connections/connection.validator.d.ts +0 -1
- package/.output/modules/setting/connections/connection.validator.js +37 -0
- package/.output/modules/{auth → setting}/members/member.validator.d.ts +0 -1
- package/.output/modules/setting/members/member.validator.js +2 -0
- package/.output/modules/setting/organization/organization.types.d.ts +22 -0
- package/.output/modules/setting/organization/organization.types.js +102 -0
- package/.output/modules/setting/organization/organization.validator.d.ts +17 -0
- package/.output/modules/setting/organization/organization.validator.js +83 -0
- package/.output/modules/setting/social/social.validator.d.ts +11 -0
- package/.output/modules/setting/social/social.validator.js +36 -0
- package/.output/modules/users/user.validator.d.ts +10 -0
- package/.output/modules/users/user.validator.js +50 -0
- package/.output/types.d.ts +23 -0
- package/.output/types.js +2 -0
- package/package.json +23 -16
- package/.output/configs/app.document.d.ts +0 -8
- package/.output/configs/app.entity.d.ts +0 -7
- package/.output/configs/app.validator.d.ts +0 -6
- package/.output/main.d.ts +0 -39
- package/.output/modules/assets/asset.document.d.ts +0 -7
- package/.output/modules/auth/organizations/organization.validator.d.ts +0 -6
- package/.output/modules/store/carts/cart.document.d.ts +0 -4
- package/.output/modules/store/carts/cart.validator.d.ts +0 -4
- package/.output/modules/store/items/item.document.d.ts +0 -6
- package/.output/modules/store/items/item.entity.d.ts +0 -8
- package/.output/modules/store/items/item.validator.d.ts +0 -5
- package/.output/modules/store/orders/order.document.d.ts +0 -5
- package/.output/modules/store/orders/order.validator.d.ts +0 -4
|
@@ -0,0 +1,102 @@
|
|
|
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.OrganizationMetadataAddress = exports.OrganizationMetadataSocial = exports.OrganizationMetadataLocalization = exports.OrganizationMetadataInformation = void 0;
|
|
13
|
+
var class_validator_1 = require("class-validator");
|
|
14
|
+
var OrganizationMetadataInformation = (function () {
|
|
15
|
+
function OrganizationMetadataInformation() {
|
|
16
|
+
this.keywords = [];
|
|
17
|
+
}
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsOptional)(),
|
|
20
|
+
(0, class_validator_1.IsString)(),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], OrganizationMetadataInformation.prototype, "title", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsOptional)(),
|
|
25
|
+
(0, class_validator_1.IsString)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], OrganizationMetadataInformation.prototype, "description", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsOptional)(),
|
|
30
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
31
|
+
__metadata("design:type", Array)
|
|
32
|
+
], OrganizationMetadataInformation.prototype, "keywords", void 0);
|
|
33
|
+
return OrganizationMetadataInformation;
|
|
34
|
+
}());
|
|
35
|
+
exports.OrganizationMetadataInformation = OrganizationMetadataInformation;
|
|
36
|
+
var OrganizationMetadataLocalization = (function () {
|
|
37
|
+
function OrganizationMetadataLocalization() {
|
|
38
|
+
}
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsOptional)(),
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], OrganizationMetadataLocalization.prototype, "language", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_validator_1.IsOptional)(),
|
|
46
|
+
(0, class_validator_1.IsString)(),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], OrganizationMetadataLocalization.prototype, "currency", void 0);
|
|
49
|
+
return OrganizationMetadataLocalization;
|
|
50
|
+
}());
|
|
51
|
+
exports.OrganizationMetadataLocalization = OrganizationMetadataLocalization;
|
|
52
|
+
var OrganizationMetadataSocial = (function () {
|
|
53
|
+
function OrganizationMetadataSocial() {
|
|
54
|
+
}
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, class_validator_1.IsOptional)(),
|
|
57
|
+
(0, class_validator_1.IsString)(),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], OrganizationMetadataSocial.prototype, "name", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, class_validator_1.IsOptional)(),
|
|
62
|
+
(0, class_validator_1.IsUrl)(),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], OrganizationMetadataSocial.prototype, "url", void 0);
|
|
65
|
+
return OrganizationMetadataSocial;
|
|
66
|
+
}());
|
|
67
|
+
exports.OrganizationMetadataSocial = OrganizationMetadataSocial;
|
|
68
|
+
var OrganizationMetadataAddress = (function () {
|
|
69
|
+
function OrganizationMetadataAddress() {
|
|
70
|
+
}
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, class_validator_1.IsOptional)(),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], OrganizationMetadataAddress.prototype, "country", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, class_validator_1.IsString)(),
|
|
77
|
+
(0, class_validator_1.IsOptional)(),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], OrganizationMetadataAddress.prototype, "code", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, class_validator_1.IsString)(),
|
|
82
|
+
(0, class_validator_1.IsOptional)(),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], OrganizationMetadataAddress.prototype, "line1", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, class_validator_1.IsString)(),
|
|
87
|
+
(0, class_validator_1.IsOptional)(),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], OrganizationMetadataAddress.prototype, "line2", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, class_validator_1.IsOptional)(),
|
|
92
|
+
(0, class_validator_1.IsString)(),
|
|
93
|
+
__metadata("design:type", String)
|
|
94
|
+
], OrganizationMetadataAddress.prototype, "city", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, class_validator_1.IsString)(),
|
|
97
|
+
(0, class_validator_1.IsOptional)(),
|
|
98
|
+
__metadata("design:type", String)
|
|
99
|
+
], OrganizationMetadataAddress.prototype, "state", void 0);
|
|
100
|
+
return OrganizationMetadataAddress;
|
|
101
|
+
}());
|
|
102
|
+
exports.OrganizationMetadataAddress = OrganizationMetadataAddress;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CreateOrganization, UpdateOrganization } from 'auth0';
|
|
2
|
+
import { OrganizationMetadataAddress, OrganizationMetadataInformation, OrganizationMetadataLocalization, OrganizationMetadataSocial } from './organization.types';
|
|
3
|
+
export declare class OrganizationMetadataValidator {
|
|
4
|
+
information?: OrganizationMetadataInformation;
|
|
5
|
+
localization?: OrganizationMetadataLocalization;
|
|
6
|
+
address?: OrganizationMetadataAddress;
|
|
7
|
+
social?: OrganizationMetadataSocial[];
|
|
8
|
+
}
|
|
9
|
+
export declare class CreateOrganizationValidator implements CreateOrganization {
|
|
10
|
+
name: string;
|
|
11
|
+
email: string;
|
|
12
|
+
password?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare class UpdateOrganizationValidator implements UpdateOrganization {
|
|
15
|
+
display_name?: string;
|
|
16
|
+
metadata: OrganizationMetadataValidator;
|
|
17
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
var class_transformer_1 = require("class-transformer");
|
|
14
|
+
var class_validator_1 = require("class-validator");
|
|
15
|
+
var organization_types_1 = require("./organization.types");
|
|
16
|
+
var OrganizationMetadataValidator = (function () {
|
|
17
|
+
function OrganizationMetadataValidator() {
|
|
18
|
+
}
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsOptional)(),
|
|
21
|
+
(0, class_validator_1.ValidateNested)(),
|
|
22
|
+
(0, class_transformer_1.Type)(function () { return organization_types_1.OrganizationMetadataInformation; }),
|
|
23
|
+
__metadata("design:type", organization_types_1.OrganizationMetadataInformation)
|
|
24
|
+
], OrganizationMetadataValidator.prototype, "information", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsOptional)(),
|
|
27
|
+
(0, class_validator_1.ValidateNested)(),
|
|
28
|
+
(0, class_transformer_1.Type)(function () { return organization_types_1.OrganizationMetadataLocalization; }),
|
|
29
|
+
__metadata("design:type", organization_types_1.OrganizationMetadataLocalization)
|
|
30
|
+
], OrganizationMetadataValidator.prototype, "localization", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsOptional)(),
|
|
33
|
+
(0, class_validator_1.ValidateNested)(),
|
|
34
|
+
(0, class_transformer_1.Type)(function () { return organization_types_1.OrganizationMetadataAddress; }),
|
|
35
|
+
__metadata("design:type", organization_types_1.OrganizationMetadataAddress)
|
|
36
|
+
], OrganizationMetadataValidator.prototype, "address", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsOptional)(),
|
|
39
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
40
|
+
(0, class_transformer_1.Type)(function () { return organization_types_1.OrganizationMetadataSocial; }),
|
|
41
|
+
__metadata("design:type", Array)
|
|
42
|
+
], OrganizationMetadataValidator.prototype, "social", void 0);
|
|
43
|
+
return OrganizationMetadataValidator;
|
|
44
|
+
}());
|
|
45
|
+
exports.OrganizationMetadataValidator = OrganizationMetadataValidator;
|
|
46
|
+
var CreateOrganizationValidator = (function () {
|
|
47
|
+
function CreateOrganizationValidator() {
|
|
48
|
+
}
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_validator_1.IsString)(),
|
|
51
|
+
(0, class_validator_1.Length)(3, 255),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], CreateOrganizationValidator.prototype, "name", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_validator_1.IsString)(),
|
|
56
|
+
(0, class_validator_1.IsEmail)(),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], CreateOrganizationValidator.prototype, "email", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, class_validator_1.IsString)(),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], CreateOrganizationValidator.prototype, "password", void 0);
|
|
63
|
+
return CreateOrganizationValidator;
|
|
64
|
+
}());
|
|
65
|
+
exports.CreateOrganizationValidator = CreateOrganizationValidator;
|
|
66
|
+
var UpdateOrganizationValidator = (function () {
|
|
67
|
+
function UpdateOrganizationValidator() {
|
|
68
|
+
}
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_validator_1.IsString)(),
|
|
71
|
+
(0, class_validator_1.IsOptional)(),
|
|
72
|
+
(0, class_validator_1.Length)(3, 255),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], UpdateOrganizationValidator.prototype, "display_name", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, class_validator_1.IsOptional)(),
|
|
77
|
+
(0, class_validator_1.ValidateNested)(),
|
|
78
|
+
(0, class_transformer_1.Type)(function () { return OrganizationMetadataValidator; }),
|
|
79
|
+
__metadata("design:type", OrganizationMetadataValidator)
|
|
80
|
+
], UpdateOrganizationValidator.prototype, "metadata", void 0);
|
|
81
|
+
return UpdateOrganizationValidator;
|
|
82
|
+
}());
|
|
83
|
+
exports.UpdateOrganizationValidator = UpdateOrganizationValidator;
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
var 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
|
+
var CreateSocialValidator = (function () {
|
|
23
|
+
function CreateSocialValidator() {
|
|
24
|
+
}
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
(0, class_validator_1.IsEnum)(SocialType),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], CreateSocialValidator.prototype, "name", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsUrl)(),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], CreateSocialValidator.prototype, "url", void 0);
|
|
34
|
+
return CreateSocialValidator;
|
|
35
|
+
}());
|
|
36
|
+
exports.CreateSocialValidator = CreateSocialValidator;
|
|
@@ -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.AddressValidator = void 0;
|
|
13
|
+
var class_validator_1 = require("class-validator");
|
|
14
|
+
var AddressValidator = (function () {
|
|
15
|
+
function AddressValidator() {
|
|
16
|
+
}
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], AddressValidator.prototype, "name", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsISO31661Alpha3)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], AddressValidator.prototype, "country", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], AddressValidator.prototype, "code", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], AddressValidator.prototype, "line1", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsString)(),
|
|
35
|
+
(0, class_validator_1.IsOptional)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], AddressValidator.prototype, "line2", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_validator_1.IsOptional)(),
|
|
40
|
+
(0, class_validator_1.IsString)(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], AddressValidator.prototype, "city", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_validator_1.IsString)(),
|
|
45
|
+
(0, class_validator_1.IsOptional)(),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], AddressValidator.prototype, "state", void 0);
|
|
48
|
+
return AddressValidator;
|
|
49
|
+
}());
|
|
50
|
+
exports.AddressValidator = AddressValidator;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { GetResponse, SearchHit, SearchRequest, SearchTotalHits } from '@elastic/elasticsearch/lib/api/types';
|
|
2
|
+
import { AppMetadata, User, UserMetadata } from 'auth0';
|
|
3
|
+
export declare type Document<D> = GetResponse<D>;
|
|
4
|
+
export declare type Search<D> = {
|
|
5
|
+
total: SearchTotalHits;
|
|
6
|
+
hits: SearchHit<D>[];
|
|
7
|
+
max_score?: number;
|
|
8
|
+
};
|
|
9
|
+
export declare type SearchQuery = Omit<SearchRequest, 'index' | 'filter_path'>;
|
|
10
|
+
export interface MetaAddress {
|
|
11
|
+
name: string;
|
|
12
|
+
country: string;
|
|
13
|
+
code: string;
|
|
14
|
+
line1: string;
|
|
15
|
+
line2?: string;
|
|
16
|
+
city: string;
|
|
17
|
+
state: string;
|
|
18
|
+
}
|
|
19
|
+
export interface UserMeta extends UserMetadata {
|
|
20
|
+
addresses?: MetaAddress[];
|
|
21
|
+
}
|
|
22
|
+
export declare type AppMeta = AppMetadata;
|
|
23
|
+
export declare type UserDocument = User<AppMeta, UserMeta>;
|
package/.output/types.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@merkaly/api",
|
|
3
|
-
"version": "0.2.2-
|
|
3
|
+
"version": "0.2.2-30",
|
|
4
4
|
"description": "NestJS Backend ApiRest Service",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"license": "UNLICENSED",
|
|
10
10
|
"author": "Randy Tellez Galan <kronhyx@gmail.com>",
|
|
11
|
-
"main": "
|
|
11
|
+
"main": "./src/main",
|
|
12
12
|
"types": "./.output/types.d.ts",
|
|
13
13
|
"files": [
|
|
14
14
|
".output"
|
|
@@ -17,46 +17,53 @@
|
|
|
17
17
|
"prebuild": "yarn run clean",
|
|
18
18
|
"build": "nest build",
|
|
19
19
|
"clean": "tsc -b --clean",
|
|
20
|
-
"console": "ts-node -r tsconfig-paths/register ./src/console.ts",
|
|
20
|
+
"console": "ts-node -r tsconfig-paths/register ./src/app.console.ts",
|
|
21
21
|
"dev": "yarn start --watch",
|
|
22
|
-
"lint": "eslint \"{src,
|
|
22
|
+
"lint": "eslint \"{src,test}/**/*.ts\" . ",
|
|
23
|
+
"migrate": "tsc --target es5 ./src/migrations/*.ts && migrate --config ./src/app.migration.ts",
|
|
23
24
|
"prepack": ".bin/package.sh",
|
|
24
25
|
"postpack": "yarn run clean",
|
|
25
26
|
"semantic-release": "yarn run build:package && semantic-release",
|
|
26
27
|
"start": "nest start",
|
|
27
|
-
"start:prod": "node
|
|
28
|
+
"start:prod": "node ./src/main.js",
|
|
28
29
|
"test": "jest",
|
|
29
30
|
"test:cov": "yarn test -- --coverage",
|
|
30
31
|
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
|
31
32
|
"test:watch": "yarn test -- --watch"
|
|
32
33
|
},
|
|
34
|
+
"lint-staged": {
|
|
35
|
+
"*.**": "yarn lint --cache --fix"
|
|
36
|
+
},
|
|
33
37
|
"dependencies": {
|
|
38
|
+
"@elastic/elasticsearch": "^8.4.0",
|
|
34
39
|
"@types/auth0": "^2.35.2",
|
|
35
40
|
"class-transformer": "^0.5.1",
|
|
36
41
|
"class-validator": "^0.13.1",
|
|
37
|
-
"mongoose": "^6
|
|
38
|
-
"reflect-metadata": "^0.1.13"
|
|
39
|
-
"short-uuid": "^4.2.0"
|
|
42
|
+
"mongoose": "^6",
|
|
43
|
+
"reflect-metadata": "^0.1.13"
|
|
40
44
|
},
|
|
41
45
|
"devDependencies": {
|
|
42
46
|
"@commitlint/config-conventional": "^17.0.0",
|
|
43
|
-
"@
|
|
47
|
+
"@faker-js/faker": "^7.5.0",
|
|
44
48
|
"@google-cloud/storage": "^6.4.1",
|
|
45
49
|
"@nestjs/cli": "^9.1.1",
|
|
46
50
|
"@nestjs/common": "^9.0.11",
|
|
47
51
|
"@nestjs/config": "^2.2.0",
|
|
48
52
|
"@nestjs/core": "^9.0.11",
|
|
49
53
|
"@nestjs/elasticsearch": "^9.0.0",
|
|
54
|
+
"@nestjs/event-emitter": "^1.3.1",
|
|
50
55
|
"@nestjs/jwt": "^9.0.0",
|
|
51
56
|
"@nestjs/mongoose": "^9.2.0",
|
|
52
57
|
"@nestjs/passport": "^9.0.0",
|
|
53
58
|
"@nestjs/platform-express": "^9.0.11",
|
|
59
|
+
"@nestjs/platform-socket.io": "^9.1.6",
|
|
54
60
|
"@nestjs/schematics": "^9.0.1",
|
|
55
61
|
"@nestjs/swagger": "^6.1.0",
|
|
56
62
|
"@nestjs/testing": "^9.0.11",
|
|
63
|
+
"@nestjs/websockets": "^9.1.6",
|
|
57
64
|
"@types/cache-manager": "^4.0.1",
|
|
58
65
|
"@types/express": "^4.17.12",
|
|
59
|
-
"@types/
|
|
66
|
+
"@types/express-session": "^1.17.5",
|
|
60
67
|
"@types/jest": "^27.0.0",
|
|
61
68
|
"@types/multer": "^1.4.7",
|
|
62
69
|
"@types/node": "^18.0.0",
|
|
@@ -66,29 +73,29 @@
|
|
|
66
73
|
"@typescript-eslint/eslint-plugin": "4.33.0",
|
|
67
74
|
"@typescript-eslint/parser": "4.33.0",
|
|
68
75
|
"auth0": "^2.42.0",
|
|
69
|
-
"cache-manager": "^
|
|
70
|
-
"chalk": "^4.1.2",
|
|
76
|
+
"cache-manager": "^5.0.0",
|
|
71
77
|
"commitlint": "^17.0.1",
|
|
72
|
-
"es-mapping-ts": "^1.0.1",
|
|
73
78
|
"eslint": "7.32.0",
|
|
74
79
|
"eslint-plugin-import": "^2.23.4",
|
|
75
80
|
"express": "^4.17.3",
|
|
76
|
-
"
|
|
81
|
+
"express-session": "^1.17.3",
|
|
77
82
|
"husky": "^8.0.1",
|
|
78
83
|
"jest": "27.5.1",
|
|
84
|
+
"lint-staged": "^13.0.3",
|
|
85
|
+
"migrate-mongoose": "^4.0.0",
|
|
79
86
|
"nestjs-console": "^8.0.0",
|
|
80
87
|
"passport": "^0.6.0",
|
|
81
88
|
"passport-jwt": "^4.0.0",
|
|
82
89
|
"rimraf": "^3.0.2",
|
|
83
90
|
"rxjs": "^7.2.0",
|
|
84
|
-
"
|
|
91
|
+
"short-unique-id": "^4.4.4",
|
|
85
92
|
"supertest": "^6.1.3",
|
|
86
93
|
"swagger-ui-express": "^4.3.0",
|
|
87
94
|
"ts-jest": "27.1.3",
|
|
88
95
|
"ts-loader": "^9.2.3",
|
|
89
96
|
"ts-node": "^10.0.0",
|
|
90
97
|
"tsconfig-paths": "^4.0.0",
|
|
91
|
-
"typescript": "
|
|
98
|
+
"typescript": "4.4.4",
|
|
92
99
|
"webpack": "^5"
|
|
93
100
|
},
|
|
94
101
|
"engines": {
|
package/.output/main.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { BrandDocument } from './modules/inventory/brands/brand.document';
|
|
2
|
-
import * as BrandValidators from './modules/inventory/brands/brand.validator';
|
|
3
|
-
import { CategoryDocument } from './modules/inventory/categories/category.document';
|
|
4
|
-
import * as CategoryValidators from './modules/inventory/categories/category.validator';
|
|
5
|
-
import { ProductDocument } from './modules/inventory/products/product.document';
|
|
6
|
-
import * as ProductValidators from './modules/inventory/products/product.validator';
|
|
7
|
-
import { CartDocument } from './modules/store/carts/cart.document';
|
|
8
|
-
import * as CartValidator from './modules/store/carts/cart.validator';
|
|
9
|
-
import { OrderDocument } from './modules/store/orders/order.document';
|
|
10
|
-
import * as OrderValidators from './modules/store/orders/order.validator';
|
|
11
|
-
export declare const Inventory: {
|
|
12
|
-
Brand: {
|
|
13
|
-
CreateBrandValidator: typeof BrandValidators.CreateBrandValidator;
|
|
14
|
-
UpdateBrandValidator: typeof BrandValidators.UpdateBrandValidator;
|
|
15
|
-
BrandDocument: typeof BrandDocument;
|
|
16
|
-
};
|
|
17
|
-
Category: {
|
|
18
|
-
CreateCategoryValidator: typeof CategoryValidators.CreateCategoryValidator;
|
|
19
|
-
UpdateCategoryValidator: typeof CategoryValidators.UpdateCategoryValidator;
|
|
20
|
-
CategoryDocument: typeof CategoryDocument;
|
|
21
|
-
};
|
|
22
|
-
Product: {
|
|
23
|
-
CreateProductValidator: typeof ProductValidators.CreateProductValidator;
|
|
24
|
-
UpdateProductValidator: typeof ProductValidators.UpdateProductValidator;
|
|
25
|
-
ProductDocument: typeof ProductDocument;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
export declare const Store: {
|
|
29
|
-
Order: {
|
|
30
|
-
CreateOrderValidator: typeof OrderValidators.CreateOrderValidator;
|
|
31
|
-
UpdateOrderValidator: typeof OrderValidators.UpdateOrderValidator;
|
|
32
|
-
OrderDocument: typeof OrderDocument;
|
|
33
|
-
};
|
|
34
|
-
Cart: {
|
|
35
|
-
CreateCartValidator: typeof CartValidator.CreateCartValidator;
|
|
36
|
-
UpdateCartValidator: typeof CartValidator.UpdateCartValidator;
|
|
37
|
-
CartDocument: typeof CartDocument;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AppDocument } from '../../../configs/app.document';
|
|
2
|
-
import { ProductDocument } from '../../inventory/products/product.document';
|
|
3
|
-
export declare class ItemDocument extends AppDocument {
|
|
4
|
-
product: Pick<ProductDocument, '$id' | 'name' | 'price'>;
|
|
5
|
-
quantity: number;
|
|
6
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { AppEntity } from '../../../configs/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
|
-
quantity: number;
|
|
6
|
-
product: ProductEntity;
|
|
7
|
-
carts: CartEntity[];
|
|
8
|
-
}
|