@merkaly/api 0.2.2-25 → 0.2.2-27

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.
Files changed (64) hide show
  1. package/.output/abstract/abstract.document.js +4 -6
  2. package/.output/abstract/abstract.entity.js +41 -21
  3. package/.output/abstract/abstract.validator.js +60 -43
  4. package/.output/modules/assets/asset.entity.js +56 -39
  5. package/.output/modules/insight/validators/order.validator.js +14 -13
  6. package/.output/modules/inventory/brands/brand.document.js +26 -5
  7. package/.output/modules/inventory/brands/brand.entity.js +37 -19
  8. package/.output/modules/inventory/brands/brand.validator.js +31 -29
  9. package/.output/modules/inventory/categories/category.document.js +27 -6
  10. package/.output/modules/inventory/categories/category.entity.js +48 -30
  11. package/.output/modules/inventory/categories/category.validator.js +43 -41
  12. package/.output/modules/inventory/products/entities/code.entity.d.ts +5 -0
  13. package/.output/modules/inventory/products/entities/code.entity.js +53 -0
  14. package/.output/modules/inventory/products/entities/dimension.entity.d.ts +6 -0
  15. package/.output/modules/inventory/products/entities/dimension.entity.js +57 -0
  16. package/.output/modules/inventory/products/entities/price.entity.d.ts +4 -0
  17. package/.output/modules/inventory/products/entities/price.entity.js +49 -0
  18. package/.output/modules/inventory/products/entities/seo.entity.d.ts +5 -0
  19. package/.output/modules/inventory/products/entities/seo.entity.js +53 -0
  20. package/.output/modules/inventory/products/product.document.js +28 -9
  21. package/.output/modules/inventory/products/product.entity.d.ts +10 -1
  22. package/.output/modules/inventory/products/product.entity.js +84 -42
  23. package/.output/modules/inventory/products/product.validator.d.ts +14 -11
  24. package/.output/modules/inventory/products/product.validator.js +99 -77
  25. package/.output/modules/inventory/products/validators/code.validator.d.ts +5 -0
  26. package/.output/modules/inventory/products/validators/code.validator.js +37 -0
  27. package/.output/modules/inventory/products/validators/dimension.validator.d.ts +6 -0
  28. package/.output/modules/inventory/products/validators/dimension.validator.js +43 -0
  29. package/.output/modules/inventory/products/validators/price.validator.d.ts +4 -0
  30. package/.output/modules/inventory/products/validators/price.validator.js +30 -0
  31. package/.output/modules/inventory/products/validators/seo.validator.d.ts +5 -0
  32. package/.output/modules/inventory/products/validators/seo.validator.js +37 -0
  33. package/.output/modules/inventory/properties/property.entity.js +42 -25
  34. package/.output/modules/inventory/properties/property.validator.js +33 -32
  35. package/.output/modules/search/search.validator.js +36 -26
  36. package/.output/modules/setting/connections/connection.validator.d.ts +0 -1
  37. package/.output/modules/setting/connections/connection.validator.js +23 -21
  38. package/.output/modules/setting/members/member.validator.d.ts +0 -1
  39. package/.output/modules/setting/members/member.validator.js +0 -1
  40. package/.output/modules/setting/organization/organization.types.js +86 -86
  41. package/.output/modules/setting/organization/organization.validator.js +68 -68
  42. package/.output/modules/setting/social/social.validator.js +15 -14
  43. package/.output/modules/store/clients/client.entity.js +60 -44
  44. package/.output/modules/store/clients/client.validator.js +53 -52
  45. package/.output/modules/store/orders/billing/billing.document.js +5 -7
  46. package/.output/modules/store/orders/billing/billing.entity.js +31 -33
  47. package/.output/modules/store/orders/billing/billing.validator.js +27 -28
  48. package/.output/modules/store/orders/item/item.document.js +5 -5
  49. package/.output/modules/store/orders/item/item.entity.js +41 -24
  50. package/.output/modules/store/orders/item/item.schema.js +2 -2
  51. package/.output/modules/store/orders/item/item.validator.js +16 -14
  52. package/.output/modules/store/orders/order.entity.d.ts +2 -1
  53. package/.output/modules/store/orders/order.entity.js +77 -55
  54. package/.output/modules/store/orders/order.validator.js +60 -57
  55. package/.output/modules/store/orders/payment/payment.entity.js +15 -13
  56. package/.output/modules/store/orders/payment/payment.schema.js +2 -2
  57. package/.output/modules/store/orders/shipping/shipping.document.js +5 -7
  58. package/.output/modules/store/orders/shipping/shipping.entity.js +31 -33
  59. package/.output/modules/store/orders/shipping/shipping.validator.js +27 -28
  60. package/.output/modules/store/orders/status/status.document.js +5 -5
  61. package/.output/modules/store/orders/status/status.entity.js +24 -24
  62. package/.output/modules/users/user.validator.js +37 -41
  63. package/.output/types.d.ts +2 -4
  64. package/package.json +11 -3
@@ -1,4 +1,19 @@
1
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
+ })();
2
17
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
18
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
19
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -10,82 +25,89 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
25
  };
11
26
  Object.defineProperty(exports, "__esModule", { value: true });
12
27
  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);
28
+ var class_transformer_1 = require("class-transformer");
29
+ var class_validator_1 = require("class-validator");
30
+ require("reflect-metadata");
31
+ var code_validator_1 = require("./validators/code.validator");
32
+ var dimension_validator_1 = require("./validators/dimension.validator");
33
+ var price_validator_1 = require("./validators/price.validator");
34
+ var seo_validator_1 = require("./validators/seo.validator");
35
+ var CreateProductValidator = (function () {
36
+ function CreateProductValidator() {
37
+ this.name = String();
38
+ this.description = String();
39
+ this.active = Boolean(1);
40
+ this.category = null;
41
+ this.brand = null;
42
+ this.files = [];
43
+ this.hashtags = [];
44
+ this.price = new price_validator_1.ProductPriceValidator();
45
+ this.seo = new seo_validator_1.ProductSeoValidator();
46
+ this.dimension = new dimension_validator_1.ProductDimensionValidator();
47
+ this.code = new code_validator_1.ProductCodeValidator();
48
+ }
49
+ __decorate([
50
+ (0, class_validator_1.IsString)(),
51
+ __metadata("design:type", Object)
52
+ ], CreateProductValidator.prototype, "name", void 0);
53
+ __decorate([
54
+ (0, class_validator_1.IsString)(),
55
+ (0, class_validator_1.IsOptional)(),
56
+ __metadata("design:type", Object)
57
+ ], CreateProductValidator.prototype, "description", void 0);
58
+ __decorate([
59
+ (0, class_validator_1.IsBoolean)(),
60
+ (0, class_validator_1.IsOptional)(),
61
+ __metadata("design:type", Object)
62
+ ], CreateProductValidator.prototype, "active", void 0);
63
+ __decorate([
64
+ (0, class_validator_1.IsOptional)(),
65
+ (0, class_validator_1.IsMongoId)(),
66
+ __metadata("design:type", String)
67
+ ], CreateProductValidator.prototype, "category", void 0);
68
+ __decorate([
69
+ (0, class_validator_1.IsOptional)(),
70
+ (0, class_validator_1.IsMongoId)(),
71
+ __metadata("design:type", String)
72
+ ], CreateProductValidator.prototype, "brand", void 0);
73
+ __decorate([
74
+ (0, class_validator_1.IsMongoId)({ each: true }),
75
+ (0, class_validator_1.IsOptional)(),
76
+ __metadata("design:type", Array)
77
+ ], CreateProductValidator.prototype, "files", void 0);
78
+ __decorate([
79
+ (0, class_validator_1.IsString)({ each: true }),
80
+ __metadata("design:type", Array)
81
+ ], CreateProductValidator.prototype, "hashtags", void 0);
82
+ __decorate([
83
+ (0, class_validator_1.ValidateNested)(),
84
+ (0, class_validator_1.IsNotEmptyObject)(),
85
+ (0, class_transformer_1.Type)(function () { return price_validator_1.ProductPriceValidator; }),
86
+ __metadata("design:type", Object)
87
+ ], CreateProductValidator.prototype, "price", void 0);
88
+ __decorate([
89
+ (0, class_validator_1.ValidateNested)(),
90
+ (0, class_transformer_1.Type)(function () { return seo_validator_1.ProductSeoValidator; }),
91
+ __metadata("design:type", Object)
92
+ ], CreateProductValidator.prototype, "seo", void 0);
93
+ __decorate([
94
+ (0, class_validator_1.ValidateNested)(),
95
+ (0, class_transformer_1.Type)(function () { return dimension_validator_1.ProductDimensionValidator; }),
96
+ __metadata("design:type", Object)
97
+ ], CreateProductValidator.prototype, "dimension", void 0);
98
+ __decorate([
99
+ (0, class_validator_1.ValidateNested)(),
100
+ (0, class_transformer_1.Type)(function () { return code_validator_1.ProductCodeValidator; }),
101
+ __metadata("design:type", Object)
102
+ ], CreateProductValidator.prototype, "code", void 0);
103
+ return CreateProductValidator;
104
+ }());
52
105
  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);
106
+ var UpdateProductValidator = (function (_super) {
107
+ __extends(UpdateProductValidator, _super);
108
+ function UpdateProductValidator() {
109
+ return _super !== null && _super.apply(this, arguments) || this;
110
+ }
111
+ return UpdateProductValidator;
112
+ }(CreateProductValidator));
91
113
  exports.UpdateProductValidator = UpdateProductValidator;
@@ -0,0 +1,5 @@
1
+ export declare class ProductCodeValidator {
2
+ sku?: string;
3
+ gtin?: string;
4
+ mpn?: string;
5
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ProductCodeValidator = void 0;
13
+ var class_validator_1 = require("class-validator");
14
+ var ProductCodeValidator = (function () {
15
+ function ProductCodeValidator() {
16
+ this.sku = String();
17
+ this.gtin = String();
18
+ this.mpn = String();
19
+ }
20
+ __decorate([
21
+ (0, class_validator_1.IsString)(),
22
+ (0, class_validator_1.IsOptional)(),
23
+ __metadata("design:type", Object)
24
+ ], ProductCodeValidator.prototype, "sku", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsString)(),
27
+ (0, class_validator_1.IsOptional)(),
28
+ __metadata("design:type", Object)
29
+ ], ProductCodeValidator.prototype, "gtin", void 0);
30
+ __decorate([
31
+ (0, class_validator_1.IsString)(),
32
+ (0, class_validator_1.IsOptional)(),
33
+ __metadata("design:type", Object)
34
+ ], ProductCodeValidator.prototype, "mpn", void 0);
35
+ return ProductCodeValidator;
36
+ }());
37
+ exports.ProductCodeValidator = ProductCodeValidator;
@@ -0,0 +1,6 @@
1
+ export declare class ProductDimensionValidator {
2
+ weight?: number;
3
+ height?: number;
4
+ width?: number;
5
+ depth?: number;
6
+ }
@@ -0,0 +1,43 @@
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.ProductDimensionValidator = void 0;
13
+ var class_validator_1 = require("class-validator");
14
+ var ProductDimensionValidator = (function () {
15
+ function ProductDimensionValidator() {
16
+ this.weight = 0;
17
+ this.height = 0;
18
+ this.width = 0;
19
+ this.depth = 0;
20
+ }
21
+ __decorate([
22
+ (0, class_validator_1.IsNumber)(),
23
+ (0, class_validator_1.IsOptional)(),
24
+ __metadata("design:type", Object)
25
+ ], ProductDimensionValidator.prototype, "weight", void 0);
26
+ __decorate([
27
+ (0, class_validator_1.IsNumber)(),
28
+ (0, class_validator_1.IsOptional)(),
29
+ __metadata("design:type", Object)
30
+ ], ProductDimensionValidator.prototype, "height", void 0);
31
+ __decorate([
32
+ (0, class_validator_1.IsNumber)(),
33
+ (0, class_validator_1.IsOptional)(),
34
+ __metadata("design:type", Object)
35
+ ], ProductDimensionValidator.prototype, "width", void 0);
36
+ __decorate([
37
+ (0, class_validator_1.IsNumber)(),
38
+ (0, class_validator_1.IsOptional)(),
39
+ __metadata("design:type", Object)
40
+ ], ProductDimensionValidator.prototype, "depth", void 0);
41
+ return ProductDimensionValidator;
42
+ }());
43
+ exports.ProductDimensionValidator = ProductDimensionValidator;
@@ -0,0 +1,4 @@
1
+ export declare class ProductPriceValidator {
2
+ sale: number;
3
+ purchase?: number;
4
+ }
@@ -0,0 +1,30 @@
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.ProductPriceValidator = void 0;
13
+ var class_validator_1 = require("class-validator");
14
+ var ProductPriceValidator = (function () {
15
+ function ProductPriceValidator() {
16
+ this.sale = 0;
17
+ this.purchase = 0;
18
+ }
19
+ __decorate([
20
+ (0, class_validator_1.IsNumber)(),
21
+ __metadata("design:type", Object)
22
+ ], ProductPriceValidator.prototype, "sale", void 0);
23
+ __decorate([
24
+ (0, class_validator_1.IsNumber)(),
25
+ (0, class_validator_1.IsOptional)(),
26
+ __metadata("design:type", Object)
27
+ ], ProductPriceValidator.prototype, "purchase", void 0);
28
+ return ProductPriceValidator;
29
+ }());
30
+ exports.ProductPriceValidator = ProductPriceValidator;
@@ -0,0 +1,5 @@
1
+ export declare class ProductSeoValidator {
2
+ title?: string;
3
+ slug?: string;
4
+ description?: string;
5
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ProductSeoValidator = void 0;
13
+ var class_validator_1 = require("class-validator");
14
+ var ProductSeoValidator = (function () {
15
+ function ProductSeoValidator() {
16
+ this.title = String();
17
+ this.slug = String();
18
+ this.description = String();
19
+ }
20
+ __decorate([
21
+ (0, class_validator_1.IsString)(),
22
+ (0, class_validator_1.IsOptional)(),
23
+ __metadata("design:type", Object)
24
+ ], ProductSeoValidator.prototype, "title", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsString)(),
27
+ (0, class_validator_1.IsOptional)(),
28
+ __metadata("design:type", Object)
29
+ ], ProductSeoValidator.prototype, "slug", void 0);
30
+ __decorate([
31
+ (0, class_validator_1.IsString)(),
32
+ (0, class_validator_1.IsOptional)(),
33
+ __metadata("design:type", Object)
34
+ ], ProductSeoValidator.prototype, "description", void 0);
35
+ return ProductSeoValidator;
36
+ }());
37
+ exports.ProductSeoValidator = ProductSeoValidator;
@@ -1,4 +1,19 @@
1
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
+ })();
2
17
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
18
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
19
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -10,29 +25,31 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
25
  };
11
26
  Object.defineProperty(exports, "__esModule", { value: true });
12
27
  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);
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));
38
55
  exports.PropertyEntity = PropertyEntity;
@@ -10,41 +10,42 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.UpdatePropertyValidator = exports.CreatePropertyValidator = exports.PropertyType = void 0;
13
- const class_validator_1 = require("class-validator");
13
+ var class_validator_1 = require("class-validator");
14
14
  var PropertyType;
15
15
  (function (PropertyType) {
16
16
  PropertyType["STRING"] = "STRING";
17
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);
18
+ var CreatePropertyValidator = (function () {
19
+ function CreatePropertyValidator() {
20
+ }
21
+ __decorate([
22
+ (0, class_validator_1.IsString)(),
23
+ __metadata("design:type", String)
24
+ ], CreatePropertyValidator.prototype, "name", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsString)(),
27
+ __metadata("design:type", String)
28
+ ], CreatePropertyValidator.prototype, "title", void 0);
29
+ __decorate([
30
+ (0, class_validator_1.IsString)(),
31
+ __metadata("design:type", String)
32
+ ], CreatePropertyValidator.prototype, "type", void 0);
33
+ return CreatePropertyValidator;
34
+ }());
35
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);
36
+ var UpdatePropertyValidator = (function () {
37
+ function UpdatePropertyValidator() {
38
+ }
39
+ __decorate([
40
+ (0, class_validator_1.IsString)(),
41
+ (0, class_validator_1.IsOptional)(),
42
+ __metadata("design:type", String)
43
+ ], UpdatePropertyValidator.prototype, "name", void 0);
44
+ __decorate([
45
+ (0, class_validator_1.IsString)(),
46
+ (0, class_validator_1.IsOptional)(),
47
+ __metadata("design:type", String)
48
+ ], UpdatePropertyValidator.prototype, "title", void 0);
49
+ return UpdatePropertyValidator;
50
+ }());
50
51
  exports.UpdatePropertyValidator = UpdatePropertyValidator;
@@ -10,30 +10,40 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
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);
13
+ var class_transformer_1 = require("class-transformer");
14
+ var class_validator_1 = require("class-validator");
15
+ var SearchValidator = (function () {
16
+ function SearchValidator() {
17
+ this.from = 0;
18
+ }
19
+ __decorate([
20
+ (0, class_validator_1.IsOptional)(),
21
+ (0, class_transformer_1.Transform)(function (_a) {
22
+ var value = _a.value;
23
+ return JSON.parse(value || 'null');
24
+ }),
25
+ __metadata("design:type", Object)
26
+ ], SearchValidator.prototype, "query", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsOptional)(),
29
+ (0, class_transformer_1.Transform)(function (_a) {
30
+ var value = _a.value;
31
+ return Number(value);
32
+ }),
33
+ (0, class_validator_1.IsInt)(),
34
+ (0, class_validator_1.Min)(1),
35
+ __metadata("design:type", Object)
36
+ ], SearchValidator.prototype, "size", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsOptional)(),
39
+ (0, class_transformer_1.Transform)(function (_a) {
40
+ var value = _a.value;
41
+ return Number(value);
42
+ }),
43
+ (0, class_validator_1.IsInt)(),
44
+ (0, class_validator_1.Min)(0),
45
+ __metadata("design:type", Object)
46
+ ], SearchValidator.prototype, "from", void 0);
47
+ return SearchValidator;
48
+ }());
39
49
  exports.SearchValidator = SearchValidator;
@@ -1,5 +1,4 @@
1
1
  import { AddOrganizationEnabledConnection, UpdateOrganizationEnabledConnection } from 'auth0';
2
- import 'reflect-metadata';
3
2
  export declare class CreateConnectionValidator implements AddOrganizationEnabledConnection {
4
3
  connection_id: AddOrganizationEnabledConnection['connection_id'];
5
4
  assign_membership_on_login: AddOrganizationEnabledConnection['assign_membership_on_login'];
@@ -10,26 +10,28 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
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);
13
+ var class_validator_1 = require("class-validator");
14
+ var CreateConnectionValidator = (function () {
15
+ function CreateConnectionValidator() {
16
+ }
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ __metadata("design:type", Object)
20
+ ], CreateConnectionValidator.prototype, "connection_id", void 0);
21
+ __decorate([
22
+ (0, class_validator_1.IsBoolean)(),
23
+ __metadata("design:type", Object)
24
+ ], CreateConnectionValidator.prototype, "assign_membership_on_login", void 0);
25
+ return CreateConnectionValidator;
26
+ }());
27
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);
28
+ var UpdateConnectionValidator = (function () {
29
+ function UpdateConnectionValidator() {
30
+ }
31
+ __decorate([
32
+ (0, class_validator_1.IsBoolean)(),
33
+ __metadata("design:type", Object)
34
+ ], UpdateConnectionValidator.prototype, "assign_membership_on_login", void 0);
35
+ return UpdateConnectionValidator;
36
+ }());
35
37
  exports.UpdateConnectionValidator = UpdateConnectionValidator;